diff --git a/os/hal/include/hal_i2c.h b/os/hal/include/hal_i2c.h index 73d6d3e0e..bd8d90ae1 100644 --- a/os/hal/include/hal_i2c.h +++ b/os/hal/include/hal_i2c.h @@ -66,11 +66,6 @@ /* Derived constants and error checks. */ /*===========================================================================*/ -/* For compatibility, some LLDs could not export this.*/ -#if !defined(I2C_SUPPORTS_SLAVE_MODE) -#define I2C_SUPPORTS_SLAVE_MODE FALSE -#endif - /*===========================================================================*/ /* Driver data structures and types. */ /*===========================================================================*/ @@ -89,6 +84,11 @@ typedef enum { #include "hal_i2c_lld.h" +/* For compatibility, some LLDs could not export this.*/ +#if !defined(I2C_SUPPORTS_SLAVE_MODE) +#define I2C_SUPPORTS_SLAVE_MODE FALSE +#endif + /*===========================================================================*/ /* Driver macros. */ /*===========================================================================*/