NavHAL 0.1.0
NAVRobotec's architecture-agnostic HAL for embedded systems.
Loading...
Searching...
No Matches
uart_reg.h File Reference
#include "common/hal_types.h"
#include <stdint.h>
Include dependency graph for uart_reg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  UARTx_Reg_Typedef
 UART peripheral register map for STM32F4. More...

Macros

#define USART1_BASE   0x40011000
#define USART2_BASE   0x40004400
#define USART6_BASE   0x40011400
#define GET_USARTx_BASE(n)
#define RCC_APB1ENR_USART2EN   (1 << 17)
#define RCC_APB2ENR_USART1EN   (1 << 4)
#define RCC_APB2ENR_USART6EN   (1 << 5)
#define USART_CR1_UE   (1 << 13)
 USART Enable.
#define USART_CR1_TE   (1 << 3)
 Transmitter Enable.
#define USART_CR1_RE   (1 << 2)
 Receiver Enable.
#define USART_SR_TXE   (1 << 7)
 Transmit Data Register Empty.
#define USART_SR_RXNE   (1 << 5)
 Read Data Register Not Empty.

Macro Definition Documentation

◆ GET_USARTx_BASE

#define GET_USARTx_BASE ( n)
Value:
((UARTx_Reg_Typedef *)(n == 1 \
: (n == 2 ? (USART2_BASE) \
: (n == 6 ? (USART6_BASE) : (NULL)))))
#define NULL
Definition hal_types.h:21
UART peripheral register map for STM32F4.
Definition uart_reg.h:15
#define USART1_BASE
Definition uart_reg.h:40
#define USART6_BASE
Definition uart_reg.h:42
#define USART2_BASE
Definition uart_reg.h:41

◆ RCC_APB1ENR_USART2EN

#define RCC_APB1ENR_USART2EN   (1 << 17)

◆ RCC_APB2ENR_USART1EN

#define RCC_APB2ENR_USART1EN   (1 << 4)

◆ RCC_APB2ENR_USART6EN

#define RCC_APB2ENR_USART6EN   (1 << 5)

◆ USART1_BASE

#define USART1_BASE   0x40011000

◆ USART2_BASE

#define USART2_BASE   0x40004400

◆ USART6_BASE

#define USART6_BASE   0x40011400

◆ USART_CR1_RE

#define USART_CR1_RE   (1 << 2)

Receiver Enable.

◆ USART_CR1_TE

#define USART_CR1_TE   (1 << 3)

Transmitter Enable.

◆ USART_CR1_UE

#define USART_CR1_UE   (1 << 13)

USART Enable.

◆ USART_SR_RXNE

#define USART_SR_RXNE   (1 << 5)

Read Data Register Not Empty.

◆ USART_SR_TXE

#define USART_SR_TXE   (1 << 7)

Transmit Data Register Empty.