canisolator2 2.0.0.0
|
API for configuring and manipulating CAN Isolator 2 Click driver. More...
Topics | |
CAN Isolator 2 Device Settings | |
Settings for registers of CAN Isolator 2 Click driver. | |
CAN Isolator 2 MikroBUS Map | |
MikroBUS pin mapping of CAN Isolator 2 Click driver. | |
Functions | |
void | canisolator2_cfg_setup (canisolator2_cfg_t *cfg) |
CAN Isolator 2 configuration object setup function. | |
err_t | canisolator2_init (canisolator2_t *ctx, canisolator2_cfg_t *cfg) |
CAN Isolator 2 initialization function. | |
err_t | canisolator2_generic_write (canisolator2_t *ctx, char *data_buf, uint16_t len) |
CAN Isolator 2 data writing function. | |
err_t | canisolator2_generic_read (canisolator2_t *ctx, char *data_buf, uint16_t max_len) |
CAN Isolator 2 data reading function. | |
err_t | canisolator2_send_data (canisolator2_t *ctx, char *tx_data) |
CAN Isolator 2 send data function. | |
API for configuring and manipulating CAN Isolator 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void canisolator2_cfg_setup | ( | canisolator2_cfg_t * | cfg | ) |
CAN Isolator 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See canisolator2_cfg_t object definition for detailed explanation. |
err_t canisolator2_generic_read | ( | canisolator2_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
CAN Isolator 2 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See canisolator2_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 canisolator2_generic_write | ( | canisolator2_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
CAN Isolator 2 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See canisolator2_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 canisolator2_init | ( | canisolator2_t * | ctx, |
canisolator2_cfg_t * | cfg ) |
CAN Isolator 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See canisolator2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See canisolator2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t canisolator2_send_data | ( | canisolator2_t * | ctx, |
char * | tx_data ) |
CAN Isolator 2 send data function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See canisolator2_t object definition for detailed explanation. |
[out] | tx_data | : Output read data. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer.