Page 1 of 1

example about UART_DRIVER_EXT_FIELDS

Posted: Mon Jan 08, 2018 7:34 pm
by josesimoes
Hi,

Is there an example on how to use this? Thanks!

Re: example about UART_DRIVER_EXT_FIELDS

Posted: Mon Jan 08, 2018 8:37 pm
by Giovanni
Hi,

I have no example right now, that macro is there in order to allow you to add fields to the UARTDriver structure, there are similar macros also in other drivers.

All you need to do is to define the macro in mcuconf.h and define more fields for the structure, use of those fields is up to you, consider that the structure is passed as pointer to callbacks, you may want to keep some additional state in there.

Giovanni