diff options
author | UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> | 2023-03-10 14:01:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-10 14:01:32 +0100 |
commit | 6d82f9e3d165e0200bed2f2784a1183f47b37fa3 (patch) | |
tree | a8ce1dbdc5c29fb7001b71f1bc5003055d303fa0 /src/stm32/setup.h | |
parent | 586aded2dddf2e6101d2709e42bceccadb50e8a1 (diff) | |
parent | c37397234534e9888dfeed9b1728c46646c33b58 (diff) |
Merge branch 'lonkaars:dev' into dev
Diffstat (limited to 'src/stm32/setup.h')
-rw-r--r-- | src/stm32/setup.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/stm32/setup.h b/src/stm32/setup.h new file mode 100644 index 0000000..66d5ff3 --- /dev/null +++ b/src/stm32/setup.h @@ -0,0 +1,24 @@ +#pragma once + +#include <stm32f0xx_hal_spi.h> +#include <stm32f0xx_hal_uart.h> +#include <stm32f0xx_hal_tim.h> +#include <stm32f0xx_hal_gpio.h> + +#define HH_IO_SPI_PINS (GPIO_PIN_5 | GPIO_PIN_7) +#define HH_IO_SPI_PORT GPIOA + +extern UART_HandleTypeDef huart2; // NOLINT +extern GPIO_InitTypeDef spi_gpio; // NOLINT +extern SPI_HandleTypeDef hspi1; // NOLINT +extern TIM_HandleTypeDef htim3; // NOLINT + +// required HAL setup functions +void HAL_MspInit(); // NOLINT +void HAL_UART_MspInit(UART_HandleTypeDef *huart); // NOLINT +void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi); // NOLINT +void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi); // NOLINT +void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base); // NOLINT +void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base); // NOLINT +void HardFault_Handler(); // NOLINT +void SysTick_Handler(); // NOLINT |