canfd7 2.1.0.0
|
API for configuring and manipulating CAN FD 7 Click driver. More...
Topics | |
CAN FD 7 Device Settings | |
Settings for registers of CAN FD 7 Click driver. | |
CAN FD 7 MikroBUS Map | |
MikroBUS pin mapping of CAN FD 7 Click driver. | |
Functions | |
void | canfd7_cfg_setup (canfd7_cfg_t *cfg) |
CAN FD 7 configuration object setup function. | |
err_t | canfd7_init (canfd7_t *ctx, canfd7_cfg_t *cfg) |
CAN FD 7 initialization function. | |
void | canfd7_default_cfg (canfd7_t *ctx) |
CAN FD 7 default configuration function. | |
err_t | canfd7_generic_write (canfd7_t *ctx, uint8_t *data_in, uint16_t len) |
CAN FD 7 data writing function. | |
err_t | canfd7_generic_read (canfd7_t *ctx, uint8_t *data_out, uint16_t len) |
CAN FD 7 data reading function. | |
void | canfd7_set_stb_pin (canfd7_t *ctx, uint8_t pin_state) |
CAN FD 7 set STB pin function. | |
API for configuring and manipulating CAN FD 7 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void canfd7_cfg_setup | ( | canfd7_cfg_t * | cfg | ) |
CAN FD 7 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See canfd7_cfg_t object definition for detailed explanation. |
void canfd7_default_cfg | ( | canfd7_t * | ctx | ) |
CAN FD 7 default configuration function.
This function executes a default configuration of CAN FD 7 click board.
[in] | ctx | : Click context object. See canfd7_t object definition for detailed explanation. |
err_t canfd7_generic_read | ( | canfd7_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len ) |
CAN FD 7 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See canfd7_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t canfd7_generic_write | ( | canfd7_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len ) |
CAN FD 7 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See canfd7_t object definition for detailed explanation. |
[in] | data_in | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. err_t canfd7_init | ( | canfd7_t * | ctx, |
canfd7_cfg_t * | cfg ) |
CAN FD 7 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See canfd7_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See canfd7_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.