rs4853v3
2.0.0.0
|
API for configuring and manipulating RS485 3V3 Click driver. More...
Modules | |
RS485 3V3 Device Settings | |
Settings for registers of RS485 3V3 Click driver. | |
RS485 3V3 MikroBUS Map | |
MikroBUS pin mapping of RS485 3V3 Click driver. | |
Functions | |
void | rs4853v3_cfg_setup (rs4853v3_cfg_t *cfg) |
RS485 3V3 configuration object setup function. More... | |
err_t | rs4853v3_init (rs4853v3_t *ctx, rs4853v3_cfg_t *cfg) |
RS485 3V3 initialization function. More... | |
void | rs4853v3_generic_write (rs4853v3_t *ctx, char *data_buf, uint16_t len) |
RS485 3V3 data writing function. More... | |
err_t | rs4853v3_generic_read (rs4853v3_t *ctx, char *data_buf, uint16_t max_len) |
RS485 3V3 data reading function. More... | |
void | rs4853v3_send_command (rs4853v3_t *ctx, char *command) |
Send command. More... | |
API for configuring and manipulating RS485 3V3 Click driver.
void rs4853v3_cfg_setup | ( | rs4853v3_cfg_t * | cfg | ) |
RS485 3V3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See rs4853v3_cfg_t object definition for detailed explanation. |
err_t rs4853v3_generic_read | ( | rs4853v3_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len | ||
) |
RS485 3V3 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See rs4853v3_t object definition for detailed explanation. |
[out] | data_buf | : Output read data. |
[in] | max_len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer.void rs4853v3_generic_write | ( | rs4853v3_t * | ctx, |
char * | data_buf, | ||
uint16_t | len | ||
) |
RS485 3V3 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See rs4853v3_t object definition for detailed explanation. |
[in] | data_buf | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
err_t rs4853v3_init | ( | rs4853v3_t * | ctx, |
rs4853v3_cfg_t * | cfg | ||
) |
RS485 3V3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See rs4853v3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See rs4853v3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void rs4853v3_send_command | ( | rs4853v3_t * | ctx, |
char * | command | ||
) |
Send command.
This function sends a command by using UART serial interface.
ctx | Click object. |
command | Command to be sent. |