singlewirecan
2.0.0.0
|
Functions | |
void | singlewirecan_cfg_setup (singlewirecan_cfg_t *cfg) |
Config Object Initialization function. More... | |
SINGLEWIRECAN_RETVAL | singlewirecan_init (singlewirecan_t *ctx, singlewirecan_cfg_t *cfg) |
Initialization function. More... | |
void | singlewirecan_generic_write (singlewirecan_t *ctx, char *data_buf, uint16_t len) |
Generic write function. More... | |
int32_t | singlewirecan_generic_read (singlewirecan_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. More... | |
void | singlewirecan_set_md_0_pin_state (singlewirecan_t *ctx, uint8_t rst_state) |
Sets MD0 pin state. More... | |
void | singlewirecan_set_md_1_pin_state (singlewirecan_t *ctx, uint8_t cs_state) |
Sets MD1 pin state. More... | |
void | singlewirecan_set_operating_mode (singlewirecan_t *ctx, uint8_t op_mode) |
Set operating mode function. More... | |
void singlewirecan_cfg_setup | ( | singlewirecan_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes Click configuration structure to init state.
int32_t singlewirecan_generic_read | ( | singlewirecan_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. |
@description This function reads a desired number of data bytes.
void singlewirecan_generic_write | ( | singlewirecan_t * | ctx, |
char * | data_buf, | ||
uint16_t | len | ||
) |
Generic write function.
ctx | Click object. |
data_buf | Data buffer for send. |
len | Number of bytes for send. |
@description This function write specified number of bytes
SINGLEWIRECAN_RETVAL singlewirecan_init | ( | singlewirecan_t * | ctx, |
singlewirecan_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 singlewirecan_set_md_0_pin_state | ( | singlewirecan_t * | ctx, |
uint8_t | rst_state | ||
) |
Sets MD0 pin state.
ctx | Click object. |
cs_state | Pin state |
@description The function set MD0 ( RST ) pin to high or low state.
void singlewirecan_set_md_1_pin_state | ( | singlewirecan_t * | ctx, |
uint8_t | cs_state | ||
) |
Sets MD1 pin state.
ctx | Click object. |
cs_state | Pin state |
@description The function set MD1 ( CS ) pin to high or low state.
void singlewirecan_set_operating_mode | ( | singlewirecan_t * | ctx, |
uint8_t | op_mode | ||
) |
Set operating mode function.
ctx | Click object. |
op_mode |
|
@description The function set desired operating mode of NCV7356 Single Wire CAN Transceiver on One-Wire CAN Click board.