diff --git a/components/hal/esp32/include/hal/gpio_ll.h b/components/hal/esp32/include/hal/gpio_ll.h index a6f62de1c5b..3f5f64a4dba 100644 --- a/components/hal/esp32/include/hal/gpio_ll.h +++ b/components/hal/esp32/include/hal/gpio_ll.h @@ -498,15 +498,15 @@ static inline void gpio_ll_set_level(gpio_dev_t *hw, uint32_t gpio_num, uint32_t { if (level) { if (gpio_num < 32) { - hw->out_w1ts = (1 << gpio_num); + hw->out_w1ts = 1 << gpio_num; } else { - HAL_FORCE_MODIFY_U32_REG_FIELD(hw->out1_w1ts, data, (1 << (gpio_num - 32))); + hw->out1_w1ts.val = 1 << (gpio_num - 32); } } else { if (gpio_num < 32) { - hw->out_w1tc = (1 << gpio_num); + hw->out_w1tc = 1 << gpio_num; } else { - HAL_FORCE_MODIFY_U32_REG_FIELD(hw->out1_w1tc, data, (1 << (gpio_num - 32))); + hw->out1_w1tc.val = 1 << (gpio_num - 32); } } } diff --git a/components/hal/esp32c2/include/hal/gpio_ll.h b/components/hal/esp32c2/include/hal/gpio_ll.h index 6906faa7db4..80301ddf706 100644 --- a/components/hal/esp32c2/include/hal/gpio_ll.h +++ b/components/hal/esp32c2/include/hal/gpio_ll.h @@ -330,9 +330,9 @@ __attribute__((always_inline)) static inline void gpio_ll_set_level(gpio_dev_t *hw, uint32_t gpio_num, uint32_t level) { if (level) { - hw->out_w1ts.out_w1ts = (1 << gpio_num); + hw->out_w1ts.val = 1 << gpio_num; } else { - hw->out_w1tc.out_w1tc = (1 << gpio_num); + hw->out_w1tc.val = 1 << gpio_num; } } diff --git a/components/hal/esp32c3/include/hal/gpio_ll.h b/components/hal/esp32c3/include/hal/gpio_ll.h index 798d190970f..cd96a95d93b 100644 --- a/components/hal/esp32c3/include/hal/gpio_ll.h +++ b/components/hal/esp32c3/include/hal/gpio_ll.h @@ -339,9 +339,9 @@ __attribute__((always_inline)) static inline void gpio_ll_set_level(gpio_dev_t *hw, uint32_t gpio_num, uint32_t level) { if (level) { - hw->out_w1ts.out_w1ts = (1 << gpio_num); + hw->out_w1ts.val = 1 << gpio_num; } else { - hw->out_w1tc.out_w1tc = (1 << gpio_num); + hw->out_w1tc.val = 1 << gpio_num; } } diff --git a/components/hal/esp32c5/include/hal/gpio_ll.h b/components/hal/esp32c5/include/hal/gpio_ll.h index 0f17f99f069..31894abc028 100644 --- a/components/hal/esp32c5/include/hal/gpio_ll.h +++ b/components/hal/esp32c5/include/hal/gpio_ll.h @@ -360,9 +360,9 @@ __attribute__((always_inline)) static inline void gpio_ll_set_level(gpio_dev_t *hw, uint32_t gpio_num, uint32_t level) { if (level) { - hw->out_w1ts.out_w1ts = (1 << gpio_num); + hw->out_w1ts.val = 1 << gpio_num; } else { - hw->out_w1tc.out_w1tc = (1 << gpio_num); + hw->out_w1tc.val = 1 << gpio_num; } } diff --git a/components/hal/esp32c6/include/hal/gpio_ll.h b/components/hal/esp32c6/include/hal/gpio_ll.h index 7871b705120..2409c412e06 100644 --- a/components/hal/esp32c6/include/hal/gpio_ll.h +++ b/components/hal/esp32c6/include/hal/gpio_ll.h @@ -332,9 +332,9 @@ __attribute__((always_inline)) static inline void gpio_ll_set_level(gpio_dev_t *hw, uint32_t gpio_num, uint32_t level) { if (level) { - hw->out_w1ts.out_w1ts = (1 << gpio_num); + hw->out_w1ts.val = 1 << gpio_num; } else { - hw->out_w1tc.out_w1tc = (1 << gpio_num); + hw->out_w1tc.val = 1 << gpio_num; } } diff --git a/components/hal/esp32c61/include/hal/gpio_ll.h b/components/hal/esp32c61/include/hal/gpio_ll.h index 1f1670aff83..a04c6ce2e5c 100644 --- a/components/hal/esp32c61/include/hal/gpio_ll.h +++ b/components/hal/esp32c61/include/hal/gpio_ll.h @@ -356,9 +356,9 @@ __attribute__((always_inline)) static inline void gpio_ll_set_level(gpio_dev_t *hw, uint32_t gpio_num, uint32_t level) { if (level) { - hw->out_w1ts.out_w1ts = (1 << gpio_num); + hw->out_w1ts.val = 1 << gpio_num; } else { - hw->out_w1tc.out_w1tc = (1 << gpio_num); + hw->out_w1tc.val = 1 << gpio_num; } } diff --git a/components/hal/esp32h2/include/hal/gpio_ll.h b/components/hal/esp32h2/include/hal/gpio_ll.h index be799df2146..8a7cfd448bd 100644 --- a/components/hal/esp32h2/include/hal/gpio_ll.h +++ b/components/hal/esp32h2/include/hal/gpio_ll.h @@ -377,9 +377,9 @@ __attribute__((always_inline)) static inline void gpio_ll_set_level(gpio_dev_t *hw, gpio_num_t gpio_num, uint32_t level) { if (level) { - hw->out_w1ts.out_w1ts = (1 << gpio_num); + hw->out_w1ts.val = 1 << gpio_num; } else { - hw->out_w1tc.out_w1tc = (1 << gpio_num); + hw->out_w1tc.val = 1 << gpio_num; } } diff --git a/components/hal/esp32p4/include/hal/gpio_ll.h b/components/hal/esp32p4/include/hal/gpio_ll.h index b152f9f863e..7fb9bec340d 100644 --- a/components/hal/esp32p4/include/hal/gpio_ll.h +++ b/components/hal/esp32p4/include/hal/gpio_ll.h @@ -400,15 +400,15 @@ static inline void gpio_ll_set_level(gpio_dev_t *hw, uint32_t gpio_num, uint32_t { if (level) { if (gpio_num < 32) { - hw->out_w1ts.out_w1ts = (1 << gpio_num); + hw->out_w1ts.val = 1 << gpio_num; } else { - hw->out1_w1ts.out1_w1ts = (1 << (gpio_num - 32)); + hw->out1_w1ts.val = 1 << (gpio_num - 32); } } else { if (gpio_num < 32) { - hw->out_w1tc.out_w1tc = (1 << gpio_num); + hw->out_w1tc.val = 1 << gpio_num; } else { - hw->out1_w1tc.out1_w1tc = (1 << (gpio_num - 32)); + hw->out1_w1tc.val = 1 << (gpio_num - 32); } } } diff --git a/components/hal/esp32s2/include/hal/gpio_ll.h b/components/hal/esp32s2/include/hal/gpio_ll.h index 382cc455ad5..233b86c3677 100644 --- a/components/hal/esp32s2/include/hal/gpio_ll.h +++ b/components/hal/esp32s2/include/hal/gpio_ll.h @@ -338,15 +338,15 @@ static inline void gpio_ll_set_level(gpio_dev_t *hw, uint32_t gpio_num, uint32_t { if (level) { if (gpio_num < 32) { - hw->out_w1ts = (1 << gpio_num); + hw->out_w1ts = 1 << gpio_num; } else { - hw->out1_w1ts.data = (1 << (gpio_num - 32)); + hw->out1_w1ts.val = 1 << (gpio_num - 32); } } else { if (gpio_num < 32) { - hw->out_w1tc = (1 << gpio_num); + hw->out_w1tc = 1 << gpio_num; } else { - hw->out1_w1tc.data = (1 << (gpio_num - 32)); + hw->out1_w1tc.val = 1 << (gpio_num - 32); } } } diff --git a/components/hal/esp32s3/include/hal/gpio_ll.h b/components/hal/esp32s3/include/hal/gpio_ll.h index 9a27591e8e5..3410e4f973b 100644 --- a/components/hal/esp32s3/include/hal/gpio_ll.h +++ b/components/hal/esp32s3/include/hal/gpio_ll.h @@ -354,15 +354,15 @@ static inline void gpio_ll_set_level(gpio_dev_t *hw, uint32_t gpio_num, uint32_t { if (level) { if (gpio_num < 32) { - hw->out_w1ts = (1 << gpio_num); + hw->out_w1ts = 1 << gpio_num; } else { - hw->out1_w1ts.data = (1 << (gpio_num - 32)); + hw->out1_w1ts.val = 1 << (gpio_num - 32); } } else { if (gpio_num < 32) { - hw->out_w1tc = (1 << gpio_num); + hw->out_w1tc = 1 << gpio_num; } else { - hw->out1_w1tc.data = (1 << (gpio_num - 32)); + hw->out1_w1tc.val = 1 << (gpio_num - 32); } } }