Skip to content

Commit c17fdd9

Browse files
committed
Atomic in I2C unknown
1 parent 18023ff commit c17fdd9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

esp32p4/include/hal/esp32p4/include/hal/i2c_ll.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ static inline void i2c_ll_set_source_clk(i2c_dev_t *hw, i2c_clock_source_t src_c
807807

808808
/// use a macro to wrap the function, force the caller to use it in a critical section
809809
/// the critical section needs to declare the __DECLARE_RCC_ATOMIC_ENV variable in advance
810-
#define i2c_ll_set_source_clk(...) do {(void)__DECLARE_RCC_ATOMIC_ENV; i2c_ll_set_source_clk(__VA_ARGS__);} while(0)
810+
#define i2c_ll_set_source_clk(...) do {i2c_ll_set_source_clk(__VA_ARGS__);} while(0)
811811

812812
/**
813813
* @brief Set LP I2C source clock

esp32p4/include/hal/include/hal/i2c_hal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void _i2c_hal_set_bus_timing(i2c_hal_context_t *hal, int scl_freq, i2c_clock_sou
9898
#if SOC_PERIPH_CLK_CTRL_SHARED
9999
/// use a macro to wrap the function, force the caller to use it in a critical section
100100
/// the critical section needs to declare the __DECLARE_RCC_ATOMIC_ENV variable in advance
101-
#define i2c_hal_set_bus_timing(...) do {(void)__DECLARE_RCC_ATOMIC_ENV; _i2c_hal_set_bus_timing(__VA_ARGS__);} while(0)
101+
#define i2c_hal_set_bus_timing(...) do {_i2c_hal_set_bus_timing(__VA_ARGS__);} while(0)
102102
#else
103103
#define i2c_hal_set_bus_timing(...) _i2c_hal_set_bus_timing(__VA_ARGS__)
104104
#endif

0 commit comments

Comments
 (0)