example about UART_DRIVER_EXT_FIELDS

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
josesimoes
Posts: 91
Joined: Sat Feb 18, 2017 11:50 am
Has thanked: 43 times
Been thanked: 23 times

example about UART_DRIVER_EXT_FIELDS

Post by josesimoes »

Hi,

Is there an example on how to use this? Thanks!
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: example about UART_DRIVER_EXT_FIELDS

Post 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
Post Reply