[PATCH rtems 2/3] confdefs: Add configure macro for libi2c

Vijay Kumar Banerjee vijay at rtems.org
Thu Jul 20 01:10:02 UTC 2023


Add CONFIGURE_APPLICATION_NEEDS_LIBI2C_DRIVER define
---
 cpukit/include/rtems/confdefs/iodrivers.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/cpukit/include/rtems/confdefs/iodrivers.h b/cpukit/include/rtems/confdefs/iodrivers.h
index 16d64fbb98..cf5530fe2b 100644
--- a/cpukit/include/rtems/confdefs/iodrivers.h
+++ b/cpukit/include/rtems/confdefs/iodrivers.h
@@ -60,6 +60,7 @@
   defined(CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER) || \
   defined(CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER) || \
   defined(CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER) || \
+  defined(CONFIGURE_APPLICATION_NEEDS_LIBI2C_DRIVER) || \
   defined(CONFIGURE_APPLICATION_EXTRA_DRIVERS)
 #define _CONFIGURE_HAS_IO_DRIVERS
 #endif
@@ -112,6 +113,10 @@
   #include <libchip/ata.h>
 #endif
 
+#ifdef CONFIGURE_APPLICATION_NEEDS_LIBI2C_DRIVER
+  #include <rtems/libi2c.h>
+#endif
+
 #ifndef CONFIGURE_MAXIMUM_DRIVERS
   #define CONFIGURE_MAXIMUM_DRIVERS
 #endif
@@ -157,6 +162,9 @@ _IO_Driver_address_table[ CONFIGURE_MAXIMUM_DRIVERS ] = {
   #ifdef CONFIGURE_APPLICATION_EXTRA_DRIVERS
     CONFIGURE_APPLICATION_EXTRA_DRIVERS,
   #endif
+  #ifdef CONFIGURE_APPLICATION_NEEDS_LIBI2C_DRIVER
+    RTEMS_LIBI2C_DRIVER_TABLE_ENTRY,
+  #endif
   #if defined(CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER) || \
     !defined(_CONFIGURE_HAS_IO_DRIVERS)
     NULL_DRIVER_TABLE_ENTRY
-- 
2.34.3



More information about the devel mailing list