usbuart5 2.1.0.0
|
API for configuring and manipulating USB UART 5 Click driver. More...
Topics | |
USB UART 5 Device Settings | |
Settings for registers of USB UART 5 Click driver. | |
USB UART 5 MikroBUS Map | |
MikroBUS pin mapping of USB UART 5 Click driver. | |
Functions | |
void | usbuart5_cfg_setup (usbuart5_cfg_t *cfg) |
USB UART 5 configuration object setup function. | |
err_t | usbuart5_init (usbuart5_t *ctx, usbuart5_cfg_t *cfg) |
USB UART 5 initialization function. | |
void | usbuart5_default_cfg (usbuart5_t *ctx) |
USB UART 5 default configuration function. | |
err_t | usbuart5_generic_write (usbuart5_t *ctx, char *data_in, uint16_t len) |
USB UART 5 data writing function. | |
err_t | usbuart5_generic_read (usbuart5_t *ctx, char *data_out, uint16_t len) |
USB UART 5 data reading function. | |
void | usbuart5_enable_device (usbuart5_t *ctx) |
USB UART 5 enable the device function. | |
void | usbuart5_reset_device (usbuart5_t *ctx) |
USB UART 5 reset the device function. | |
void | usbuart5_set_cts_pin (usbuart5_t *ctx, usbuart5_pin_state_t state) |
USB UART 5 set cts pin state function. | |
uint8_t | usbuart5_get_suspend_state (usbuart5_t *ctx) |
USB UART 5 get USB Suspend state function. | |
uint8_t | usbuart5_get_rts_pin (usbuart5_t *ctx) |
USB UART 5 get rts pin state function. | |
API for configuring and manipulating USB UART 5 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void usbuart5_cfg_setup | ( | usbuart5_cfg_t * | cfg | ) |
USB UART 5 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See usbuart5_cfg_t object definition for detailed explanation. |
void usbuart5_default_cfg | ( | usbuart5_t * | ctx | ) |
USB UART 5 default configuration function.
This function executes a default configuration of USB UART 5 click board.
[in] | ctx | : Click context object. See usbuart5_t object definition for detailed explanation. |
void usbuart5_enable_device | ( | usbuart5_t * | ctx | ) |
USB UART 5 enable the device function.
This function enable the CP2110 Single-Chip HID USB to UART Bridge on the USB UART 5 Click boardâ„¢.
[in] | ctx | : Click context object. See usbuart5_t object definition for detailed explanation. |
err_t usbuart5_generic_read | ( | usbuart5_t * | ctx, |
char * | data_out, | ||
uint16_t | len ) |
USB UART 5 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See usbuart5_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t usbuart5_generic_write | ( | usbuart5_t * | ctx, |
char * | data_in, | ||
uint16_t | len ) |
USB UART 5 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See usbuart5_t object definition for detailed explanation. |
[in] | data_in | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. uint8_t usbuart5_get_rts_pin | ( | usbuart5_t * | ctx | ) |
USB UART 5 get rts pin state function.
This function returns the RTS (Ready To Send) pin logic state.
[in] | ctx | : Click context object. See usbuart5_t object definition for detailed explanation. |
uint8_t usbuart5_get_suspend_state | ( | usbuart5_t * | ctx | ) |
USB UART 5 get USB Suspend state function.
This function get USB Suspend state of the CP2110 Single-Chip HID USB to UART Bridge on the USB UART 5 Click boardâ„¢.
[in] | ctx | : Click context object. See usbuart5_t object definition for detailed explanation. |
0
- Connected, 1
- USB Suspend state. err_t usbuart5_init | ( | usbuart5_t * | ctx, |
usbuart5_cfg_t * | cfg ) |
USB UART 5 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See usbuart5_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See usbuart5_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void usbuart5_reset_device | ( | usbuart5_t * | ctx | ) |
USB UART 5 reset the device function.
This function performs resets the CP2110 Single-Chip HID USB to UART Bridge on the USB UART 5 Click boardâ„¢.
[in] | ctx | : Click context object. See usbuart5_t object definition for detailed explanation. |
void usbuart5_set_cts_pin | ( | usbuart5_t * | ctx, |
usbuart5_pin_state_t | state ) |
USB UART 5 set cts pin state function.
This function sets the CTS (Clear To Send) pin logic state.
[in] | ctx | : Click context object. See usbuart5_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |