From 4a968c60bcbb85d77cc080955ede383ca1036042 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 9 Apr 2023 06:22:09 +0000 Subject: [PATCH] Fixed check for slave support. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@16210 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/hal/include/hal_i2c.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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. */ /*===========================================================================*/