WE310F5  39.00.000
m2mb_uart.h
Go to the documentation of this file.
1 /*===============================================================================================*/
2 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
30 #ifndef M2MB_UART_API_H
31 #define M2MB_UART_API_H
32 
42 /*-----------------------------------------------------------------------------------------------*/
43 
48 /*-----------------------------------------------------------------------------------------------*/
49 
50 
51 /* Global declarations ==========================================================================*/
52 #define M2MB_CONSOLE_PORT M2MB_UART_HS_PORT_E
53 
54 /* Global typedefs ==============================================================================*/
55 
62 
122 typedef VOID(*M2MB_UART_CB_T)(UINT32 num_bytes, VOID *p_cb_data);
123 
129 typedef enum
130 {
136 
142 typedef enum
143 {
149 
155 typedef enum
156 {
162 
168 typedef enum
169 {
175 
182 typedef struct M2MB_UART_CONFIG
183 {
202 
203 /* Global functions =============================================================================*/
204 
205 /*-----------------------------------------------------------------------------------------------*/
273 /*-----------------------------------------------------------------------------------------------*/
275  M2MB_UART_CONFIG_T *p_config );
276 
277 /*-----------------------------------------------------------------------------------------------*/
347 /*-----------------------------------------------------------------------------------------------*/
349 
350 /*-----------------------------------------------------------------------------------------------*/
422 /*-----------------------------------------------------------------------------------------------*/
424  UINT32 bytes_to_tx, VOID *p_cb_data );
425 
426 /*-----------------------------------------------------------------------------------------------*/
492 /*-----------------------------------------------------------------------------------------------*/
493 UINT8* m2mb_uart_read( HANDLE h, UINT32* size, UINT32 timeout, UINT8* buff, VOID *p_cb_data );
494 
495 
496 
500 /*-----------------------------------------------------------------------------------------------*/
501 
502 #endif /* M2MB_UART_API_H */
503 
UINT32 enable_loopback
Definition: m2mb_uart.h:189
UINT32 baud_rate
Definition: m2mb_uart.h:184
VOID(* M2MB_UART_CB_T)(UINT32 num_bytes, VOID *p_cb_data)
UART call back prototype.
Definition: m2mb_uart.h:122
unsigned char UINT8
Definition: m2mb_types.h:86
M2MB_STATUS_T m2mb_uart_close(M2MB_UART_HANDLE_T p_handle)
Close UART port.
M2MB_UART_NUM_STOP_BITS_E num_stop_bits
Definition: m2mb_uart.h:187
M2MB_UART_BITS_PER_CHAR_E
UART bits per character configuration enumeration.
Definition: m2mb_uart.h:155
INT32 M2MB_STATUS_T
Definition: m2mb_status.h:97
M2MB_UART_CB_T tx_cb
Definition: m2mb_uart.h:191
M2MB_STATUS_T m2mb_uart_open(M2MB_UART_HANDLE_T *p_handle, M2MB_UART_PORT_ID_E id, M2MB_UART_CONFIG_T *p_config)
Opens the UART port.
char CHAR
Definition: m2mb_types.h:76
M2MB_UART_NUM_STOP_BITS_E
UART number of stop bits configuration enumeration.
Definition: m2mb_uart.h:168
struct M2MB_UART_CONFIG M2MB_UART_CONFIG_T
Structure to configure UART module.
M2MB_UART_CB_T rx_cb
Definition: m2mb_uart.h:196
M2MB_UART_PARITY_MODE_E
UART parity mode configuration enumeration.
Definition: m2mb_uart.h:142
void VOID
Definition: m2mb_types.h:74
M2MB_STATUS_T m2mb_uart_write(M2MB_UART_HANDLE_T p_handle, CHAR *p_buf, UINT32 bytes_to_tx, VOID *p_cb_data)
Transmits data over UART port.
unsigned long int UINT32
Definition: m2mb_types.h:88
void * HANDLE
Definition: m2mb_types.h:98
M2MB_UART_PARITY_MODE_E parity_mode
Definition: m2mb_uart.h:186
UINT8 * m2mb_uart_read(HANDLE h, UINT32 *size, UINT32 timeout, UINT8 *buff, VOID *p_cb_data)
Receives data from UART port.
Structure to configure UART module.
Definition: m2mb_uart.h:182
UINT32 enable_flow_ctrl
Definition: m2mb_uart.h:190
VOID * M2MB_UART_HANDLE_T
UART Handle pointer.
Definition: m2mb_uart.h:61
M2MB_UART_BITS_PER_CHAR_E bits_per_char
Definition: m2mb_uart.h:188
M2MB_UART_PORT_ID_E
UART Port Identifier enumeration.
Definition: m2mb_uart.h:129