canfd 2.0.0.0
|
Functions | |
void | canfd_cfg_setup (canfd_cfg_t *cfg) |
Config Object Initialization function. | |
CANFD_RETVAL | canfd_init (canfd_t *ctx, canfd_cfg_t *cfg) |
Initialization function. | |
void | canfd_set_wke_pin (canfd_t *ctx, uint8_t state) |
Set WKE ( wake-up ) pin state. | |
void | canfd_set_stb_pin (canfd_t *ctx, uint8_t state) |
Set RST ( reset ) pin state. | |
uint8_t | canfd_get_err_pin (canfd_t *ctx) |
Set ERR ( INT ) pin state. | |
void | canfd_set_stand_by_stb_pin (canfd_t *ctx, uint8_t stb_state) |
Set STB ( RST ) pin state. | |
void | canfd_set_mode_en_pin (canfd_t *ctx, uint8_t en_state) |
Set EN ( CS ) pin state. | |
void | canfd_generic_write (canfd_t *ctx, char *data_buf, uint16_t len) |
Generic write function. | |
int32_t | canfd_generic_read (canfd_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. | |
void | canfd_set_operating_mode (canfd_t *ctx, uint8_t op_mode) |
Operation mode. | |
void canfd_cfg_setup | ( | canfd_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
int32_t canfd_generic_read | ( | canfd_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
Generic read function.
ctx | Click object. |
data_buf | Data buffer for read data. |
max_len | The maximum length of data that can be read. |
void canfd_generic_write | ( | canfd_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
Generic write function.
ctx | Click object. |
data_buf | Data buffer for sends. |
len | Number of bytes for sends. |
uint8_t canfd_get_err_pin | ( | canfd_t * | ctx | ) |
Set ERR ( INT ) pin state.
ctx | Click object. |
state | Pin state ( 1 or 0 ). |
CANFD_RETVAL canfd_init | ( | canfd_t * | ctx, |
canfd_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void canfd_set_mode_en_pin | ( | canfd_t * | ctx, |
uint8_t | en_state ) |
Set EN ( CS ) pin state.
ctx | Click object. |
stb_state | Pin state ( 1 or 0 ). |
void canfd_set_operating_mode | ( | canfd_t * | ctx, |
uint8_t | op_mode ) |
Operation mode.
ctx | Click object. |
op_mode | Mode. |
void canfd_set_stand_by_stb_pin | ( | canfd_t * | ctx, |
uint8_t | stb_state ) |
Set STB ( RST ) pin state.
ctx | Click object. |
stb_state | Pin state ( 1 or 0 ). |
void canfd_set_stb_pin | ( | canfd_t * | ctx, |
uint8_t | state ) |
Set RST ( reset ) pin state.
ctx | Click object. |
state | Pin state ( 1 or 0 ). |
void canfd_set_wke_pin | ( | canfd_t * | ctx, |
uint8_t | state ) |
Set WKE ( wake-up ) pin state.
ctx | Click object. |
state | Pin state ( 1 or 0 ). |