uart 1.0
AVR mega series uart library
Loading...
Searching...
No Matches
UART_enums.h File Reference

Enumerations for UART data status, error codes, and handshake states. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum UART_Data_t UART_Data
 Alias for enum UART_Data_t representing UART receive status.
typedef enum UART_Error_t UART_Error
 Alias for enum UART_Error_t representing UART error status.
typedef enum UART_Handshake_t UART_Handshake
 Alias for enum UART_Handshake_t representing flow control status.

Enumerations

enum  UART_Data_t { UART_Empty = 0 , UART_Received , UART_Fault }
 UART receive buffer status indicators. More...
enum  UART_Error_t { UART_None = 0 , UART_Frame , UART_Overrun , UART_Parity }
 UART frame error codes. More...
enum  UART_Handshake_t { UART_Status = 0 , UART_Ready , UART_Pause }
 UART hardware/software flow control states. More...

Detailed Description

Enumerations for UART data status, error codes, and handshake states.

This header file defines the enums used to represent UART receive status, communication errors, and hardware/software handshake conditions. It includes enumerations for data reception states, UART frame errors, and flow control signaling.

Note
These enums improve code readability by providing meaningful symbolic names for UART-related values, facilitating robust error handling and status reporting in embedded applications.
Author
g.raf
Date
2025-12-07
Version
1.0 Release
Note
This file is part of a larger project and subject to the license specified in the repository. For updates and the complete revision history, see the GitHub repository.
See also
https://github.com/0x007e/avr-common "AVR Common GitHub Repository"

Typedef Documentation

◆ UART_Data

typedef enum UART_Data_t UART_Data

Alias for enum UART_Data_t representing UART receive status.

◆ UART_Error

typedef enum UART_Error_t UART_Error

Alias for enum UART_Error_t representing UART error status.

◆ UART_Handshake

Alias for enum UART_Handshake_t representing flow control status.

Enumeration Type Documentation

◆ UART_Data_t

UART receive buffer status indicators.

This enumeration represents the state of the UART receive operation:

  • UART_Empty: No new data available
  • UART_Received: Valid data byte received
  • UART_Fault: Receive error detected
Enumerator
UART_Empty 

No data available in receive buffer

UART_Received 

Valid data byte successfully received

UART_Fault 

Receive operation failed (error condition)

◆ UART_Error_t

UART frame error codes.

This enumeration defines specific error conditions detected during UART reception: Corresponds to USART status register error flags (FE, DOR, UPE).

Enumerator
UART_None 

No UART error detected

UART_Frame 

Framing error (invalid stop bit)

UART_Overrun 

Data overrun (RX buffer overflow)

UART_Parity 

Parity error (invalid parity bit)

◆ UART_Handshake_t

UART hardware/software flow control states.

This enumeration represents the flow control/handshake status between communicating devices: Used for RTS/CTS hardware handshake or XON/XOFF software flow control.

Enumerator
UART_Status 

Initial/unknown handshake state

UART_Ready 

Ready to send/receive data

UART_Pause 

Pause transmission (flow control active)