canfd6 2.0.0.0
|
CANFD6 Click example. More...
Macros | |
#define | DEMO_APP_TRANSMITTER |
#define | CANFD6_FIRST_MSG 0 |
#define | CANFD6_SECOND_MSG 1 |
Functions | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
CANFD6 Click example.
This application presents the capabilities of the CAN FD 6 click board. The board can be used both as a receiver and a transmitter. Use def directive to define the receive or transmit app.
The demo application is composed of two sections :
The app starts by initializing the UART LOG and SPI drivers. The default cfg function performs the mandatory settings of the device. The user's default configuration can be modified ( for more information about device configuration, check the datasheet ). Additionally, the app writes two messages to the FIFO buffer and sends them if the transmit buffer content event is triggered.
Depending on the defined app option, the application task performs the following procedure. If the transmitter is preferred, the application task triggers the transmit buffer contents event of the first message and, later on, the second message. On the other hand, the receiver waits for the CAN FD interrupt, where the payload is read along with the header ID.
#define CANFD6_FIRST_MSG 0 |
#define CANFD6_SECOND_MSG 1 |
#define DEMO_APP_TRANSMITTER |
void application_init | ( | void | ) |
< Logger config object.
< Click config object.
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
int main | ( | void | ) |