usbuart 2.0.0.0
usbuart.h File Reference

This file contains API for USB UART Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  usbuart_t
 USB UART Click context object. More...
 
struct  usbuart_cfg_t
 USB UART Click configuration object. More...
 

Macros

#define USBUART_MODE_SLEEP   1
 USB UART description setting.
 
#define USBUART_MODE_NORMAL   0
 
#define USBUART_CTS_ACTIVE   1
 
#define USBUART_CTS_NO_ACTIVE   0
 
#define USBUART_POWER_ON   1
 
#define USBUART_POWER_OFF   0
 
#define DRV_BUFFER_SIZE   500
 USB UART driver buffer size.
 
#define USBUART_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  usbuart_return_value_t { USBUART_OK = 0 , USBUART_ERROR = -1 }
 USB UART Click return value data. More...
 

Functions

void usbuart_cfg_setup (usbuart_cfg_t *cfg)
 USB UART configuration object setup function.
 
err_t usbuart_init (usbuart_t *ctx, usbuart_cfg_t *cfg)
 USB UART initialization function.
 
void usbuart_generic_write (usbuart_t *ctx, char *data_buf, uint16_t len)
 USB UART data writing function.
 
uint32_t usbuart_generic_read (usbuart_t *ctx, char *data_buf, uint16_t max_len)
 USB UART data reading function.
 
void usbuart_pwr_ctrl (usbuart_t *ctx, uint8_t state)
 Power control.
 
void usbuart_set_cts (usbuart_t *ctx, uint8_t state)
 Set CTS (Clear to send)
 
void usbuart_set_mode (usbuart_t *ctx, uint8_t mode)
 Set device mode.
 
uint8_t usbuart_get_rts (usbuart_t *ctx)
 Set device mode.
 
void usbuart_send_command (usbuart_t *ctx, char *command)
 Function for send command.
 

Detailed Description

This file contains API for USB UART Click Driver.

Enumeration Type Documentation

◆ usbuart_return_value_t

USB UART Click return value data.

Predefined enum values for driver return values.

Enumerator
USBUART_OK 
USBUART_ERROR