ioLibrary for Cortex M series
Classes | Macros | Typedefs | Enumerations
Usart_module

Classes

struct  usart_param_t
 

Macros

#define WIZPF_USART_SET_PARAM(param_p, br_e, wl_e, sb_e, pb_e, fc_e)
 

Typedefs

typedef enum usart_baudrate_t usart_baudrate
 
typedef enum usart_wordlen_t usart_wordlen
 
typedef enum usart_stopbit_t usart_stopbit
 
typedef enum usart_parity_t usart_parity
 
typedef enum usart_flowcon_t usart_flowcon
 
typedef struct usart_param_t usart_param
 

Enumerations

enum  wizpf_usart { WIZ_USART1, WIZ_USART2 }
 
enum  usart_baudrate_t {
  UBR_110 = 110, UBR_300 = 300, UBR_600 = 600, UBR_1200 = 1200,
  UBR_2400 = 2400, UBR_4800 = 4800, UBR_9600 = 9600, UBR_14400 = 14400,
  UBR_19200 = 19200, UBR_38400 = 38400, UBR_57600 = 57600, UBR_115200 = 115200,
  UBR_230400 = 230400, UBR_460800 = 460800, UBR_921600 = 921600
}
 
enum  usart_wordlen_t { UWL_8 = 0, UWL_9 = 1 }
 
enum  usart_stopbit_t { UST_0d5 = 0, UST_1 = 1, UST_1d5 = 2, UST_2 = 3 }
 
enum  usart_parity_t { UPB_NO = 0, UPB_EVEN = 1, UPB_ODD = 2 }
 
enum  usart_flowcon_t { UFC_NO = 0, UFC_HW = 1 }
 

Detailed Description

Macro Definition Documentation

#define WIZPF_USART_SET_PARAM (   param_p,
  br_e,
  wl_e,
  sb_e,
  pb_e,
  fc_e 
)
Value:
do { \
(param_p)->baudrate = br_e; \
(param_p)->wordlen = wl_e; \
(param_p)->stopbit = sb_e; \
(param_p)->parity = pb_e; \
(param_p)->flowcon = fc_e; \
} while(0)

Set USART Parameters to usart_param_t pointer

Parameters
param_pUSART Parameter struct pointer
br_eBaud Rate to set (usart_baudrate_t)
wl_eWord Length to set (usart_wordlen_t)
sb_eStop Bit to set (usart_stopbit_t)
pb_eParity Bit to set (usart_parity_t)
fc_eFlow Control to set (usart_flowcon_t)

Definition at line 129 of file wizplatform.h.

Typedef Documentation

Indicate the USART Baud Rate

Indicate the USART Word Length

Indicate the USART Stop Bit

Indicate the USART Parity Bit

Indicate the USART Flow Control

typedef struct usart_param_t usart_param

USART Parameter struct used by wizpf_usart_init

Enumeration Type Documentation

Indicate the USART index number

Enumerator
WIZ_USART1 

Indicate the 1st USART.

WIZ_USART2 

Indicate the 2nd USART.

Definition at line 20 of file wizplatform.h.

Indicate the USART Baud Rate

Enumerator
UBR_110 

Baudrate 110 bps.

UBR_300 

Baudrate 300 bps.

UBR_600 

Baudrate 600 bps.

UBR_1200 

Baudrate 1200 bps.

UBR_2400 

Baudrate 2400 bps.

UBR_4800 

Baudrate 4800 bps.

UBR_9600 

Baudrate 9600 bps.

UBR_14400 

Baudrate 14400 bps.

UBR_19200 

Baudrate 19200 bps.

UBR_38400 

Baudrate 38400 bps.

UBR_57600 

Baudrate 57600 bps.

UBR_115200 

Baudrate 115200 bps.

UBR_230400 

Baudrate 230400 bps.

UBR_460800 

Baudrate 460800 bps.

UBR_921600 

Baudrate 921600 bps.

Definition at line 27 of file wizplatform.h.

Indicate the USART Word Length

Enumerator
UWL_8 

Word Length 8 bit.

UWL_9 

Word Length 9 bit.

Definition at line 46 of file wizplatform.h.

Indicate the USART Stop Bit

Enumerator
UST_0d5 

Stop bit 0.5 bit.

UST_1 

Stop bit 1 bit.

UST_1d5 

Stop bit 1.5 bit.

UST_2 

Stop bit 2 bit.

Definition at line 52 of file wizplatform.h.

Indicate the USART Parity Bit

Enumerator
UPB_NO 

No Parity.

UPB_EVEN 

Even Parity.

UPB_ODD 

Odd Parity.

Definition at line 60 of file wizplatform.h.

Indicate the USART Flow Control

Enumerator
UFC_NO 

No Flow Control.

UFC_HW 

RTS+CTS Flow Control.

Definition at line 67 of file wizplatform.h.