example about UART_DRIVER_EXT_FIELDS

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
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

Postby josesimoes » Mon Jan 08, 2018 7:34 pm

Hi,

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

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: example about UART_DRIVER_EXT_FIELDS

Postby Giovanni » Mon Jan 08, 2018 8:37 pm

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


Return to “ChibiOS/HAL”

Who is online

Users browsing this forum: No registered users and 7 guests