singlewirecan 2.0.0.0
|
Functions | |
void | singlewirecan_cfg_setup (singlewirecan_cfg_t *cfg) |
Config Object Initialization function. | |
SINGLEWIRECAN_RETVAL | singlewirecan_init (singlewirecan_t *ctx, singlewirecan_cfg_t *cfg) |
Initialization function. | |
void | singlewirecan_generic_write (singlewirecan_t *ctx, char *data_buf, uint16_t len) |
Generic write function. | |
int32_t | singlewirecan_generic_read (singlewirecan_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. | |
void | singlewirecan_set_md_0_pin_state (singlewirecan_t *ctx, uint8_t rst_state) |
Sets MD0 pin state. | |
void | singlewirecan_set_md_1_pin_state (singlewirecan_t *ctx, uint8_t cs_state) |
Sets MD1 pin state. | |
void | singlewirecan_set_operating_mode (singlewirecan_t *ctx, uint8_t op_mode) |
Set operating mode function. | |
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 | - 0x00 ( ONEWIRECAN_OPERATING_MODE_SLEEP ) : Sleep mode; - 0x01 ( ONEWIRECAN_OPERATING_MODE_HIGH_SPEED ) : High-Speed mode; - 0x02 ( ONEWIRECAN_OPERATING_MODE_HIGH_VOLTAGE_WAKE_UP ) : Wake_Up mode; - 0x03 ( ONEWIRECAN_OPERATING_MODE_NORMAL ) : Normal mode; |
@description The function set desired operating mode of NCV7356 Single Wire CAN Transceiver on One-Wire CAN Click board.