diff options
Diffstat (limited to 'src/fmc-test/include')
-rw-r--r-- | src/fmc-test/include/stm-uart.h | 16 | ||||
-rw-r--r-- | src/fmc-test/include/stm32f4xx_hal_conf.h | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/fmc-test/include/stm-uart.h b/src/fmc-test/include/stm-uart.h new file mode 100644 index 0000000..c106d76 --- /dev/null +++ b/src/fmc-test/include/stm-uart.h @@ -0,0 +1,16 @@ +#ifndef __STM32_DEV_BRIDGE_UART_H +#define __STM32_DEV_BRIDGE_UART_H + +#include "stm32f4xx_hal.h" + +#define USART2_BAUD_RATE 115200 + +extern void MX_USART2_UART_Init(void); + +extern void uart_send_binary(uint32_t num, uint8_t bits); +extern void uart_send_string(char *s); +extern void uart_send_integer(uint32_t data, uint32_t mag); + +extern UART_HandleTypeDef huart2; + +#endif /* __STM32_DEV_BRIDGE_UART_H */ diff --git a/src/fmc-test/include/stm32f4xx_hal_conf.h b/src/fmc-test/include/stm32f4xx_hal_conf.h index f1c9cb1..fd13d9e 100644 --- a/src/fmc-test/include/stm32f4xx_hal_conf.h +++ b/src/fmc-test/include/stm32f4xx_hal_conf.h @@ -73,7 +73,7 @@ //#define HAL_SD_MODULE_ENABLED //#define HAL_SPI_MODULE_ENABLED //#define HAL_TIM_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED +#define HAL_UART_MODULE_ENABLED //#define HAL_USART_MODULE_ENABLED //#define HAL_IRDA_MODULE_ENABLED //#define HAL_SMARTCARD_MODULE_ENABLED |