adapter 2.0.0.0
|
Functions | |
void | adapter_cfg_setup (adapter_cfg_t *cfg) |
Config Object Initialization function. | |
ADAPTER_RETVAL | adapter_init (adapter_t *ctx, adapter_cfg_t *cfg) |
Initialization function. | |
void | adapter_generic_write (adapter_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | adapter_generic_read (adapter_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | adapter_generic_transfer (adapter_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | adapter_turn_tx_on (adapter_t *ctx) |
Turn TX on function. | |
void | adapter_turn_rx_on (adapter_t *ctx) |
Turn RX on function. | |
void | adapter_turn_pwm_on (adapter_t *ctx) |
Turn PWM on function. | |
void | adapter_turn_tx_off (adapter_t *ctx) |
Turn TX off function. | |
void | adapter_turn_rx_off (adapter_t *ctx) |
Turn RX off function. | |
void | adapter_turn_pwm_off (adapter_t *ctx) |
Turn PWM off function. | |
uint8_t | adapter_check_int (adapter_t *ctx) |
Check INT function. | |
void adapter_cfg_setup | ( | adapter_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t adapter_check_int | ( | adapter_t * | ctx | ) |
Check INT function.
ctx | Click object. |
@description Function is used to check the state of INT pin.
void adapter_generic_read | ( | adapter_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function reads data from the desired register.
void adapter_generic_transfer | ( | adapter_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
void adapter_generic_write | ( | adapter_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function writes data to the desired register.
ADAPTER_RETVAL adapter_init | ( | adapter_t * | ctx, |
adapter_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 adapter_turn_pwm_off | ( | adapter_t * | ctx | ) |
Turn PWM off function.
ctx | Click object. |
@description Function is used to set PWM pin to 0.
void adapter_turn_pwm_on | ( | adapter_t * | ctx | ) |
Turn PWM on function.
ctx | Click object. |
@description Function is used to set PWM pin to 1.
void adapter_turn_rx_off | ( | adapter_t * | ctx | ) |
Turn RX off function.
ctx | Click object. |
@description Function is used to set RX pin to 0.
void adapter_turn_rx_on | ( | adapter_t * | ctx | ) |
Turn RX on function.
ctx | Click object. |
@description Function is used to set RX pin to 1.
void adapter_turn_tx_off | ( | adapter_t * | ctx | ) |
Turn TX off function.
ctx | Click object. |
@description Function is used to set TX pin to 0.
void adapter_turn_tx_on | ( | adapter_t * | ctx | ) |
Turn TX on function.
ctx | Click object. |
@description Function is used to set TX pin to 1.