NHAL Interface v0.5.0
Hardware Abstraction Layer Interface for Embedded Systems
Loading...
Searching...
No Matches
nhal_uart_types.h
Go to the documentation of this file.
1
12#ifndef NHAL_UART_TYPES_H
13#define NHAL_UART_TYPES_H
14
15#include <stddef.h>
16#include <stdint.h>
17
18#include "nhal_common.h"
19
20typedef uint8_t nhal_uart_bus_id;
21
22
28
33
38
46
52
53 struct nhal_uart_impl_ctx * impl_ctx;
54
55 // Async extensions handled separately in async context
56};
57
58typedef void (*nhal_uart_tx_complete_cb_t)(void *context);
59typedef void (*nhal_uart_rx_complete_cb_t)(void *context);
60typedef void (*nhal_uart_error_cb_t)(void *context);
61
62
63#endif /* NHAL_UART_TYPES_H */
nhal_uart_stop_bits_t
@ NHAL_UART_STOP_BITS_1
1 stop bit is used.
@ NHAL_UART_STOP_BITS_2
2 stop bits are used.
void(* nhal_uart_tx_complete_cb_t)(void *context)
void(* nhal_uart_error_cb_t)(void *context)
uint8_t nhal_uart_bus_id
nhal_uart_data_bits_t
@ NHAL_UART_DATA_BITS_7
7 data bits are used.
@ NHAL_UART_DATA_BITS_8
8 data bits are used.
nhal_uart_parity_t
@ 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.
@ NHAL_UART_PARITY_NONE
No parity bit is used.
void(* nhal_uart_rx_complete_cb_t)(void *context)
uint32_t baudrate
The baud rate for communication (bits per second).
nhal_uart_stop_bits_t stop_bits
The number of stop bits (e.g., 1 or 2).
nhal_uart_data_bits_t data_bits
The number of data bits (e.g., 7 or 8).
nhal_uart_parity_t parity
The parity setting (none, even, or odd).
struct nhal_uart_impl_config * impl_config
Base UART context - always present, minimal footprint.
nhal_uart_bus_id uart_bus_id
struct nhal_uart_impl_ctx * impl_ctx