► Warning fixes

- Changed all float constants to use f suffix to prevent double conversions
- Removed compile warnings due to HAL_GPIO_* related calls
- Added comms.h with prototypes for functions which were used in main()
- Casts and externs to fix compile warnings in various files.
- Made a bunch of file-local variables static.
- Fixed buzzerFreq/buzzerPattern extern declarations with correct type (uint8_t)
- Since this is C, void func() { } needs to be void func(void) { }, so fixed that in all instances.
These updates follows from @trollcop
This commit is contained in:
EmanuelFeru
2019-06-10 20:18:37 +02:00
parent 9fdbba1c37
commit 43b4f4aa20
8 changed files with 120 additions and 91 deletions

View File

@@ -53,7 +53,7 @@ volatile adc_buf_t adc_buffer;
#ifdef CONTROL_SERIAL_USART2
void UART_Control_Init() {
void UART_Control_Init(void) {
GPIO_InitTypeDef GPIO_InitStruct;
__HAL_RCC_USART2_CLK_ENABLE();
/* DMA1_Channel6_IRQn interrupt configuration */
@@ -123,7 +123,7 @@ HAL_DMA_Init(&hdma_usart2_tx);
#endif
#ifdef DEBUG_SERIAL_USART3
void UART_Init() {
void UART_Init(void) {
__HAL_RCC_USART3_CLK_ENABLE();
__HAL_RCC_DMA1_CLK_ENABLE();
@@ -156,7 +156,7 @@ void UART_Init() {
#endif
#ifdef DEBUG_SERIAL_USART2
void UART_Init() {
void UART_Init(void) {
__HAL_RCC_USART2_CLK_ENABLE();
__HAL_RCC_DMA1_CLK_ENABLE();
@@ -189,7 +189,7 @@ void UART_Init() {
#endif
/*
void UART_Init() {
void UART_Init(void) {
__HAL_RCC_USART2_CLK_ENABLE();
__HAL_RCC_DMA1_CLK_ENABLE();
@@ -224,7 +224,7 @@ void UART_Init() {
DMA_HandleTypeDef hdma_i2c2_rx;
DMA_HandleTypeDef hdma_i2c2_tx;
void I2C_Init()
void I2C_Init(void)
{
__HAL_RCC_I2C2_CLK_ENABLE();