Skip to content

Commit

Permalink
revert not needed change
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Sep 5, 2024
1 parent c32a8cb commit e3b7fae
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion components/hal/include/hal/i2c_hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ void _i2c_hal_set_bus_timing(i2c_hal_context_t *hal, int scl_freq, i2c_clock_sou
#if SOC_PERIPH_CLK_CTRL_SHARED
/// use a macro to wrap the function, force the caller to use it in a critical section
/// the critical section needs to declare the __DECLARE_RCC_ATOMIC_ENV variable in advance
int __DECLARE_RCC_ATOMIC_ENV __attribute__ ((unused)); // To avoid build errors/warnings about __DECLARE_RCC_ATOMIC_ENV
#define i2c_hal_set_bus_timing(...) do {(void)__DECLARE_RCC_ATOMIC_ENV; _i2c_hal_set_bus_timing(__VA_ARGS__);} while(0)
#else
#define i2c_hal_set_bus_timing(...) _i2c_hal_set_bus_timing(__VA_ARGS__)
Expand Down

0 comments on commit e3b7fae

Please sign in to comment.