39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
74#define USBUART5_SUSPEND_MODE_DISABLE 0
75#define USBUART5_SUSPEND_MODE_ENABLE 1
82#define USBUART5_TX_DRV_BUFFER_SIZE 100
83#define USBUART5_RX_DRV_BUFFER_SIZE 300
101#define USBUART5_MAP_MIKROBUS( cfg, mikrobus ) \
102 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
103 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
104 cfg.spd = MIKROBUS( mikrobus, MIKROBUS_AN ); \
105 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
106 cfg.rts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
107 cfg.cts = MIKROBUS( mikrobus, MIKROBUS_INT );
#define USBUART5_RX_DRV_BUFFER_SIZE
Definition usbuart5.h:83
#define USBUART5_TX_DRV_BUFFER_SIZE
USB UART 5 driver buffer size.
Definition usbuart5.h:82
uint8_t usbuart5_get_suspend_state(usbuart5_t *ctx)
USB UART 5 get USB Suspend state function.
err_t usbuart5_init(usbuart5_t *ctx, usbuart5_cfg_t *cfg)
USB UART 5 initialization function.
err_t usbuart5_generic_write(usbuart5_t *ctx, char *data_in, uint16_t len)
USB UART 5 data writing function.
void usbuart5_set_cts_pin(usbuart5_t *ctx, usbuart5_pin_state_t state)
USB UART 5 set cts pin state function.
void usbuart5_cfg_setup(usbuart5_cfg_t *cfg)
USB UART 5 configuration object setup function.
err_t usbuart5_generic_read(usbuart5_t *ctx, char *data_out, uint16_t len)
USB UART 5 data reading function.
void usbuart5_default_cfg(usbuart5_t *ctx)
USB UART 5 default configuration function.
void usbuart5_reset_device(usbuart5_t *ctx)
USB UART 5 reset the device function.
void usbuart5_enable_device(usbuart5_t *ctx)
USB UART 5 enable the device function.
uint8_t usbuart5_get_rts_pin(usbuart5_t *ctx)
USB UART 5 get rts pin state function.
USB UART 5 Click configuration object.
Definition usbuart5.h:140
pin_name_t rts
Definition usbuart5.h:149
uint32_t baud_rate
Definition usbuart5.h:152
pin_name_t spd
Definition usbuart5.h:146
pin_name_t cts
Definition usbuart5.h:148
bool uart_blocking
Definition usbuart5.h:153
uart_data_bits_t data_bit
Definition usbuart5.h:154
pin_name_t tx_pin
Definition usbuart5.h:143
pin_name_t rx_pin
Definition usbuart5.h:142
uart_stop_bits_t stop_bit
Definition usbuart5.h:156
uart_parity_t parity_bit
Definition usbuart5.h:155
pin_name_t rst
Definition usbuart5.h:147
USB UART 5 Click context object.
Definition usbuart5.h:117
digital_in_t spd
Definition usbuart5.h:123
uart_t uart
Definition usbuart5.h:127
digital_in_t rts
Definition usbuart5.h:124
digital_out_t rst
Definition usbuart5.h:119
digital_out_t cts
Definition usbuart5.h:120
usbuart5_pin_state_t
USB UART 5 Click pin state.
Definition usbuart5.h:176
@ USBUART5_PIN_STATE_HIGH
Definition usbuart5.h:178
@ USBUART5_PIN_STATE_LOW
Definition usbuart5.h:177
usbuart5_return_value_t
USB UART 5 Click return value data.
Definition usbuart5.h:165
@ USBUART5_OK
Definition usbuart5.h:166
@ USBUART5_ERROR
Definition usbuart5.h:167