From c6563a099ce05d9291a0c27fdbab3ffd9efddc48 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 10 Mar 2023 12:26:33 +0100 Subject: initial merge of #26 --- src/stm32/setup.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/stm32/setup.h (limited to 'src/stm32/setup.h') 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 +#include +#include +#include + +#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 -- cgit v1.2.3