]> granicus.if.org Git - esp-idf/commitdiff
ulp: add I_WR_REG_BIT convenience macro
authorIvan Grokhotkov <ivan@espressif.com>
Mon, 20 Feb 2017 07:40:21 +0000 (15:40 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Wed, 22 Feb 2017 06:40:36 +0000 (14:40 +0800)
components/ulp/include/esp32/ulp.h

index 6d4bb18b1377423e4bc324aa81ae84ec3ecfd02e..3978e708685838628ecb23280794b8f1ec4b6f14 100644 (file)
@@ -333,6 +333,14 @@ static inline uint32_t SOC_REG_TO_ULP_PERIPH_SEL(uint32_t reg) {
     .high = high_bit, \
     .opcode = OPCODE_RD_REG } }
 
+/**
+ * Set or clear a bit in the peripheral register.
+ *
+ * Sets bit (1 << shift) of register reg to value val.
+ * This instruction can access RTC_CNTL_, RTC_IO_, and SENS_ peripheral registers.
+ */
+#define I_WR_REG_BIT(reg, shift, val) I_WR_REG(reg, shift, shift, val)
+
 /**
  * End program.
  *