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

Vijay Kumar Banerjee vijay at rtems.org
Tue Jul 25 02:31:02 UTC 2023


Hi Sebastian,

On Mon, Jul 24, 2023 at 10:09 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> On 20.07.23 03:10, Vijay Kumar Banerjee wrote:
> > Add CONFIGURE_APPLICATION_NEEDS_LIBI2C_DRIVER define
>
> Do we really need this? What happens if an I2C device needs interrupts
> during initialization?
>

the libi2c initialize calls rtems_io_register_driver, which requires
`CONFIGURE_MAXIMUM_DRIVERS` defined from the application. In some
BSPs, like mvme3100, libi2c is initialized at sysinit, causing the
application to crash without the define. Adding this confdefs macro
allows the user to add the libi2c if it is needed by the app, or omit
it without crashing the system. In its current state, libi2c requires
the BSP to handle registering the buses and drivers after
initialization, the interrupt can be handled by the BSP I2C handler.




> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list