Hi,
Is there an example on how to use this? Thanks!
example about UART_DRIVER_EXT_FIELDS
-
- Posts: 91
- Joined: Sat Feb 18, 2017 11:50 am
- Has thanked: 43 times
- Been thanked: 23 times
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: example about UART_DRIVER_EXT_FIELDS
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
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
Who is online
Users browsing this forum: No registered users and 24 guests