mbusrf4 2.0.0.0
|
Functions | |
void | mbusrf4_cfg_setup (mbusrf4_cfg_t *cfg) |
Config Object Initialization function. | |
MBUSRF4_RETVAL | mbusrf4_init (mbusrf4_t *ctx, mbusrf4_cfg_t *cfg) |
Initialization function. | |
void | mbusrf4_generic_write (mbusrf4_t *ctx, char *data_buf, uint16_t len) |
Generic write function. | |
int32_t | mbusrf4_generic_read (mbusrf4_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. | |
uint8_t | mbusrf4_get_state_rts (mbusrf4_t *ctx) |
Get Interrupt state of the RTS(INT) pin. | |
void | mbusrf4_set_communication_mode (mbusrf4_t *ctx, uint8_t mode) |
Set communication SPI/UART. | |
void | mbusrf4_send_command (mbusrf4_t *ctx, uint8_t command, uint8_t length, uint8_t *payload_buff) |
Send command - UART communication. | |
void | mbusrf4_transmit_data (mbusrf4_t *ctx, uint8_t *tx_buf, uint8_t tx_len) |
uint8_t | mbusrf4_get_state_ind (mbusrf4_t *ctx) |
Get Interrupt state of the IND(AN) pin. | |
void mbusrf4_cfg_setup | ( | mbusrf4_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
int32_t mbusrf4_generic_read | ( | mbusrf4_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 read data of maximum length.
void mbusrf4_generic_write | ( | mbusrf4_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. |
@description This function write specific number of data.
uint8_t mbusrf4_get_state_ind | ( | mbusrf4_t * | ctx | ) |
Get Interrupt state of the IND(AN) pin.
ctx | Click object. |
@description This function gets state of IND pin.
uint8_t mbusrf4_get_state_rts | ( | mbusrf4_t * | ctx | ) |
Get Interrupt state of the RTS(INT) pin.
ctx | Click object. |
@description This function get state of RTS pin.
ctx | Click object. |
@description This function gets state of RTS pin.
MBUSRF4_RETVAL mbusrf4_init | ( | mbusrf4_t * | ctx, |
mbusrf4_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 mbusrf4_send_command | ( | mbusrf4_t * | ctx, |
uint8_t | command, | ||
uint8_t | length, | ||
uint8_t * | payload_buff ) |
Send command - UART communication.
ctx | Click object. |
command | Command |
length | Number of bytes in Payload buffer |
payload_buff | Pointer to a payload buffer |
@description Header and checksum are calculated and sent at the beginning (header) and finally (checksum)
void mbusrf4_set_communication_mode | ( | mbusrf4_t * | ctx, |
uint8_t | mode ) |
Set communication SPI/UART.
ctx | Click object. |
mode | Select communication SPI/UART (UART is default) |
@description This function sets desired mode.
void mbusrf4_transmit_data | ( | mbusrf4_t * | ctx, |
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |