hal
Hardware Abstraction Layer
stm32f4_uart_util.h
Go to the documentation of this file.
1 
8 #ifndef _STM32F4_UART_UTIL_H
9 #define _STM32F4_UART_UTIL_H
10 
11 #include <stdint.h>
12 
13 #define SYS_FREQ 16000000 // Default system frequency
14 #define APB1_CLK SYS_FREQ
15 #define APB2_CLK SYS_FREQ
16 
30 uint16_t stm32f4_hal_compute_uart_bd(uint32_t periph_clk, uint32_t baud_rate);
31 
32 #endif /* _STM32F4_UART_UTIL_H */
uint16_t stm32f4_hal_compute_uart_bd(uint32_t periph_clk, uint32_t baud_rate)
Calculate the 16 bit register value for a desired baud rate.
Definition: stm32f4_uart_util.c:10