NHAL Interface v0.5.0
Hardware Abstraction Layer Interface for Embedded Systems
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations
nhal_uart_types.h File Reference

Defines common data types, enumerations, and structures for UART HAL operations. More...

#include <stddef.h>
#include <stdint.h>
#include "nhal_common.h"

Go to the source code of this file.

Data Structures

struct  nhal_uart_config
 
struct  nhal_uart_context
 Base UART context - always present, minimal footprint. More...
 

Typedefs

typedef uint8_t nhal_uart_bus_id
 
typedef void(* nhal_uart_tx_complete_cb_t) (void *context)
 
typedef void(* nhal_uart_rx_complete_cb_t) (void *context)
 
typedef void(* nhal_uart_error_cb_t) (void *context)
 

Enumerations

enum  nhal_uart_parity_t { NHAL_UART_PARITY_NONE , NHAL_UART_PARITY_EVEN , NHAL_UART_PARITY_ODD }
 
enum  nhal_uart_stop_bits_t { NHAL_UART_STOP_BITS_1 , NHAL_UART_STOP_BITS_2 }
 
enum  nhal_uart_data_bits_t { NHAL_UART_DATA_BITS_7 , NHAL_UART_DATA_BITS_8 }
 

Detailed Description

Defines common data types, enumerations, and structures for UART HAL operations.

This header provides the necessary type definitions used across the Universal Asynchronous Receiver-Transmitter (UART) Hardware Abstraction Layer (HAL). It includes definitions for UART identifiers, operation status codes, parity settings, and structures for common and complete UART configurations, as well as the UART context/handle. These types aim to provide a consistent interface for various UART implementations.

Definition in file nhal_uart_types.h.

Typedef Documentation

◆ nhal_uart_bus_id

typedef uint8_t nhal_uart_bus_id

Definition at line 20 of file nhal_uart_types.h.

◆ nhal_uart_error_cb_t

typedef void(* nhal_uart_error_cb_t) (void *context)

Definition at line 60 of file nhal_uart_types.h.

◆ nhal_uart_rx_complete_cb_t

typedef void(* nhal_uart_rx_complete_cb_t) (void *context)

Definition at line 59 of file nhal_uart_types.h.

◆ nhal_uart_tx_complete_cb_t

typedef void(* nhal_uart_tx_complete_cb_t) (void *context)

Definition at line 58 of file nhal_uart_types.h.

Enumeration Type Documentation

◆ nhal_uart_data_bits_t

Enumerator
NHAL_UART_DATA_BITS_7 

7 data bits are used.

NHAL_UART_DATA_BITS_8 

8 data bits are used.

Definition at line 34 of file nhal_uart_types.h.

◆ nhal_uart_parity_t

Enumerator
NHAL_UART_PARITY_NONE 

No parity bit is used.

NHAL_UART_PARITY_EVEN 

Parity bit is set such that the total number of '1' bits is even.

NHAL_UART_PARITY_ODD 

Parity bit is set such that the total number of '1' bits is odd.

Definition at line 23 of file nhal_uart_types.h.

◆ nhal_uart_stop_bits_t

Enumerator
NHAL_UART_STOP_BITS_1 

1 stop bit is used.

NHAL_UART_STOP_BITS_2 

2 stop bits are used.

Definition at line 29 of file nhal_uart_types.h.