From 1702ce6ce430a66bb7af51644b91b7c196e719d9 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 29 Jun 2022 11:03:02 +0300 Subject: =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D1=8E=20=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D1=8B=D0=B9=20=D1=80=D0=B5=D0=BF=D0=BE=D0=B7=D0=B8=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D0=B9.=20=D0=9F=D1=80=D0=BE=D0=B3=D1=80?= =?UTF-8?q?=D0=B0=D0=BC=D0=BC=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D1=81=D0=B8=D0=B8=20NixieClock=5Fv2.=20=D0=A0=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=82=D0=B0=D0=B5=D1=82,=20=D1=87=D0=B0=D1=81?= =?UTF-8?q?=D1=8B=20=D1=82=D0=B8=D0=BA=D0=B0=D1=8E=D1=82.=20=D0=95=D1=81?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BF=D1=80=D0=BE=D0=B1=D0=BB=D0=B5=D0=BC=D0=B0?= =?UTF-8?q?,=20=D1=87=D1=82=D0=BE=20=D1=81=D0=BA=D0=B0=D1=87=D0=B5=D1=82?= =?UTF-8?q?=20=D0=B2=D1=82=D0=BE=D1=80=D0=B0=D1=8F=20=D1=81=D0=B5=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=80=D0=BD=D0=B0=D1=8F=20=D0=BA=D0=BD=D0=BE=D0=BF?= =?UTF-8?q?=D0=BA=D0=B0=20(=D0=BE=D0=BD=D0=B0=20=D0=B2=20=D0=B4=D1=80?= =?UTF-8?q?=D1=83=D0=B3=D0=BE=D0=BC=20=D0=BA=D0=B0=D0=BD=D0=B0=D0=BB=D0=B5?= =?UTF-8?q?).=20=D0=9F=D0=BE=D1=8D=D1=82=D0=BE=D0=BC=D1=83=20=D0=BD=D0=B0?= =?UTF-8?q?=20=D0=BD=D0=B5=D0=B5=20=D1=81=D0=BE=D0=B1=D0=B8=D1=80=D0=B0?= =?UTF-8?q?=D1=8E=D1=81=D1=8C=20=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D1=82=D1=8C?= =?UTF-8?q?=20=D0=B0=D0=BD=D1=82=D0=B8=D0=B4=D1=80=D0=B5=D0=B1=D0=B5=D0=B7?= =?UTF-8?q?=D0=B3.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Libraries/LED_Driver/led_driver_config.h | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Libraries/LED_Driver/led_driver_config.h (limited to 'Libraries/LED_Driver/led_driver_config.h') diff --git a/Libraries/LED_Driver/led_driver_config.h b/Libraries/LED_Driver/led_driver_config.h new file mode 100644 index 0000000..7e377ac --- /dev/null +++ b/Libraries/LED_Driver/led_driver_config.h @@ -0,0 +1,44 @@ +#ifndef LED_DRIVER_CONFIG_INCLUDED +#define LED_DRIVER_CONFIG_INCLUDED + +#include "stm32f0xx_conf.h" + +/* Communication boards SPIx Interface */ +#define LED_SPIx SPI2 +#define LED_SPIx_CLK RCC_APB1Periph_SPI2 +#define LED_SPIx_IRQn SPI2_IRQn +#define LED_SPIx_IRQHandler SPI2_IRQHandler + +#define LED_SPIx_SCK_PIN GPIO_Pin_10 +#define LED_SPIx_SCK_GPIO_PORT GPIOB +#define LED_SPIx_SCK_GPIO_CLK RCC_AHBPeriph_GPIOB +#define LED_SPIx_SCK_SOURCE GPIO_PinSource10 +#define LED_SPIx_SCK_AF GPIO_AF_5 + +#define LED_SPIx_MOSI_PIN GPIO_Pin_15 +#define LED_SPIx_MOSI_GPIO_PORT GPIOB +#define LED_SPIx_MOSI_GPIO_CLK RCC_AHBPeriph_GPIOB +#define LED_SPIx_MOSI_SOURCE GPIO_PinSource15 +#define LED_SPIx_MOSI_AF GPIO_AF_0 + +#define LED_SPIx_ST_PIN GPIO_Pin_9 +#define LED_SPIx_ST_GPIO_PORT GPIOB +#define LED_SPIx_ST_GPIO_CLK RCC_AHBPeriph_GPIOA +#define LED_SPIx_ST_SOURCE GPIO_PinSource9 +#define LED_SPIx_ST_AF GPIO_AF_5 + +#define LED_SPIx_RCC_APBxPeriphClockCmd RCC_APB1PeriphClockCmd + +// Определения для таймера LedRgbDriver ------------------------------------- // +#define LED_TIMx TIM3 +#define LED_TIM_IRQHandler TIM3_IRQHandler +#define LED_TIM_RCC RCC_APB1Periph_TIM3 +#define LED_TIM_IRQx TIM3_IRQn +#define LED_RCC_APBxPeriphClockCmd RCC_APB1PeriphClockCmd + +#define LED_ST_PIN_SET GPIO_SetBits ( LED_SPIx_ST_GPIO_PORT, LED_SPIx_ST_PIN ) +#define LED_ST_PIN_RESET GPIO_ResetBits ( LED_SPIx_ST_GPIO_PORT, LED_SPIx_ST_PIN ) + +void LED_Driver_Config ( void ); + +#endif //LED_DRIVER_CONFIG_INCLUDED \ No newline at end of file -- cgit v1.2.3