diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-10-11 14:27:53 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-10-11 14:27:53 +0200 |
commit | 5b1f94522624e18fe9fd94478ada1c8d8997b747 (patch) | |
tree | d9a34d21a620a700b9fb0dbf5ba4cef59fb44683 /stm32f091/setup.h | |
parent | 687767404ede06182a5d1f09ab3b7c66ba5f4d13 (diff) |
more WIP, untested i2c but usart2 works
Diffstat (limited to 'stm32f091/setup.h')
-rw-r--r-- | stm32f091/setup.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/stm32f091/setup.h b/stm32f091/setup.h index 36eb9af..bca0e82 100644 --- a/stm32f091/setup.h +++ b/stm32f091/setup.h @@ -1,7 +1,19 @@ #pragma once -void SystemClock_Config(); -void MX_I2C2_Init(); -void MX_USART2_UART_Init(); -void MX_GPIO_Init(); -void Error_Handler(); +#include <stm32f0xx_hal_i2c.h> +#include <stm32f0xx_hal_uart.h> + +#define WS_PINOUT_I2C_SDA_PIN GPIO_PIN_9 +#define WS_PINOUT_I2C_SDA_PORT GPIOB +#define WS_PINOUT_I2C_SCL_PIN GPIO_PIN_8 +#define WS_PINOUT_I2C_SCL_PORT GPIOB +#define WS_PINOUT_USART_RX_PIN GPIO_PIN_3 +#define WS_PINOUT_USART_RX_PORT GPIOA +#define WS_PINOUT_USART_TX_PIN GPIO_PIN_2 +#define WS_PINOUT_USART_TX_PORT GPIOA + +extern I2C_HandleTypeDef hi2c1; +extern UART_HandleTypeDef huart2; + +void ws_io_setup(); + |