canbus
2.0.0.0
|
API for configuring and manipulating CAN Bus Click driver. More...
Modules | |
CAN Bus Device Settings | |
Settings for registers of CAN Bus Click driver. | |
CAN Bus MikroBUS Map | |
MikroBUS pin mapping of CAN Bus Click driver. | |
Functions | |
void | canbus_cfg_setup (canbus_cfg_t *cfg) |
CAN Bus configuration object setup function. More... | |
err_t | canbus_init (canbus_t *ctx, canbus_cfg_t *cfg) |
CAN Bus initialization function. More... | |
err_t | canbus_default_cfg (canbus_t *ctx) |
CAN Bus default configuration function. More... | |
err_t | canbus_generic_write (canbus_t *ctx, char *data_buf, uint16_t len) |
CAN Bus data writing function. More... | |
err_t | canbus_generic_read (canbus_t *ctx, char *data_buf, uint16_t max_len) |
CAN Bus data reading function. More... | |
err_t | canbus_set_low_current_standby_mode (canbus_t *ctx) |
CAN Bus low current standby mode function. More... | |
err_t | canbus_set_high_speed_mode (canbus_t *ctx) |
CAN Bus high speed mode function. More... | |
err_t | canbus_send_data (canbus_t *ctx, char *tx_data) |
CAN Bus send data function. More... | |
API for configuring and manipulating CAN Bus Click driver.
void canbus_cfg_setup | ( | canbus_cfg_t * | cfg | ) |
CAN Bus configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See canbus_cfg_t object definition for detailed explanation. |
err_t canbus_default_cfg | ( | canbus_t * | ctx | ) |
CAN Bus default configuration function.
This function executes a default configuration of CAN Bus click board.
[in] | ctx | : Click context object. See canbus_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t canbus_generic_read | ( | canbus_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len | ||
) |
CAN Bus data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See canbus_t object definition for detailed explanation. |
[out] | data_buf | : Output read data. |
[in] | max_len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer.err_t canbus_generic_write | ( | canbus_t * | ctx, |
char * | data_buf, | ||
uint16_t | len | ||
) |
CAN Bus data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See canbus_t object definition for detailed explanation. |
[in] | data_buf | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error.err_t canbus_init | ( | canbus_t * | ctx, |
canbus_cfg_t * | cfg | ||
) |
CAN Bus initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See canbus_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See canbus_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t canbus_send_data | ( | canbus_t * | ctx, |
char * | tx_data | ||
) |
CAN Bus send data function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See canbus_t object definition for detailed explanation. |
[out] | tx_data | : Output read data. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer.err_t canbus_set_high_speed_mode | ( | canbus_t * | ctx | ) |
CAN Bus high speed mode function.
This function enables the high speed operation mode by clears the STB ( AN ) pin on the low level of the CAN Bus click boardâ„¢.
[in] | ctx | : Click context object. See canbus_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t canbus_set_low_current_standby_mode | ( | canbus_t * | ctx | ) |
CAN Bus low current standby mode function.
This function enables the low current standby mode by sets the STB ( AN ) pin on the high level of the CAN Bus click boardâ„¢.
[in] | ctx | : Click context object. See canbus_t object definition for detailed explanation. |
0
- Success, -1
- Error.