uartmux2 2.0.0.0
|
API for configuring and manipulating UART MUX 2 Click driver. More...
Topics | |
UART MUX 2 Commands List | |
List of commands of UART MUX 2 Click driver. | |
UART MUX 2 Device Settings | |
UART MUX 2 description register. | |
UART MUX 2 MikroBUS Map | |
MikroBUS pin mapping of UART MUX 2 Click driver. | |
Status | |
Op_mode | |
Mux_ch | |
Functions | |
void | uartmux2_cfg_setup (uartmux2_cfg_t *cfg) |
UART MUX 2 configuration object setup function. | |
err_t | uartmux2_init (uartmux2_t *ctx, uartmux2_cfg_t *cfg) |
UART MUX 2 initialization function. | |
void | uartmux2_default_cfg (uartmux2_t *ctx) |
UART MUX 2 default configuration function. | |
err_t | uartmux2_generic_write (uartmux2_t *ctx, char *data_buf, uint16_t len) |
UART MUX 2 data writing function. | |
err_t | uartmux2_generic_read (uartmux2_t *ctx, char *data_buf, uint16_t max_len) |
UART MUX 2 data reading function. | |
err_t | uartmux2_set_operation_mode (uartmux2_t *ctx, uint8_t op_mode) |
UART MUX 2 set operation mode function. | |
err_t | uartmux2_set_channel (uartmux2_t *ctx, uint8_t mux_ch) |
UART MUX 2 set channel function. | |
err_t | uartmux2_send_data (uartmux2_t *ctx, char *tx_data) |
UART MUX 2 data writing function. | |
uint8_t | uartmux2_get_inv_status (uartmux2_t *ctx) |
UART MUX 2 get INV pin status function. | |
API for configuring and manipulating UART MUX 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void uartmux2_cfg_setup | ( | uartmux2_cfg_t * | cfg | ) |
UART MUX 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See uartmux2_cfg_t object definition for detailed explanation. |
void uartmux2_default_cfg | ( | uartmux2_t * | ctx | ) |
UART MUX 2 default configuration function.
This function executes a default configuration of UART MUX 2 click board.
[in] | ctx | : Click context object. See uartmux2_t object definition for detailed explanation. |
err_t uartmux2_generic_read | ( | uartmux2_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
UART MUX 2 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See uartmux2_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.err_t uartmux2_generic_write | ( | uartmux2_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
UART MUX 2 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See uartmux2_t object definition for detailed explanation. |
[in] | data_buf | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error.uint8_t uartmux2_get_inv_status | ( | uartmux2_t * | ctx | ) |
UART MUX 2 get INV pin status function.
This function get INV pin status ( RS232 status ) of the UART MUX 2 click board.
[in] | ctx | : Click context object. See uartmux2_t object definition for detailed explanation. |
0
- RS232 receiver input are unpowered, 1
- RS232 receiver input are powered.err_t uartmux2_init | ( | uartmux2_t * | ctx, |
uartmux2_cfg_t * | cfg ) |
UART MUX 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See uartmux2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See uartmux2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t uartmux2_send_data | ( | uartmux2_t * | ctx, |
char * | tx_data ) |
UART MUX 2 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See uartmux2_t object definition for detailed explanation. |
[in] | tx_data | : Data buffer for sending. |
>=0
- Success, <0
- Error.err_t uartmux2_set_channel | ( | uartmux2_t * | ctx, |
uint8_t | mux_ch ) |
UART MUX 2 set channel function.
This function set a desired channel f the UART MUX 2 click board.
[in] | ctx | : Click context object. See uartmux2_t object definition for detailed explanation. |
[in] | mux_ch | : Selected channel
|
0
- Success, -1
- Error.err_t uartmux2_set_operation_mode | ( | uartmux2_t * | ctx, |
uint8_t | op_mode ) |
UART MUX 2 set operation mode function.
This function set a desired operation mode of the UART MUX 2 click board.
[in] | ctx | : Click context object. See uartmux2_t object definition for detailed explanation. |
[in] | op_mode | : Operation mode
|
0
- Success, -1
- Error.