From 45c5b1252f806edc4f76e7c4ec9d7011a74e3a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Tue, 23 Feb 2016 20:28:03 +0100 Subject: [PATCH] add pinout comment --- lib/led_ws2812b.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/led_ws2812b.c b/lib/led_ws2812b.c index 12735ee..8b0c904 100644 --- a/lib/led_ws2812b.c +++ b/lib/led_ws2812b.c @@ -37,14 +37,14 @@ #define WS2812B_SPI_DR SPI1_DR #define WS2812B_SPI_RCC RCC_SPI1 #define WS2812B_SPI_PORT GPIOA -#define WS2812B_SPI_CLK GPIO_SPI1_SCK -#define WS2812B_SPI_DOUT GPIO_SPI1_MISO +#define WS2812B_SPI_CLK GPIO_SPI1_SCK // connect PWM output to clock input on PA5 +#define WS2812B_SPI_DOUT GPIO_SPI1_MISO // connect WS2812b DIN to MISO pin PA6 #define WS2812B_TIMER TIM3 #define WS2812B_TIMER_RCC RCC_TIM3 #define WS2812B_TIMER_OC TIM_OC3 #define WS2812B_CLK_RCC RCC_GPIOB #define WS2812B_CLK_PORT GPIOB -#define WS2812B_CLK_PIN GPIO_TIM3_CH3 +#define WS2812B_CLK_PIN GPIO_TIM3_CH3 // connect SPI clock input to PWM clock output PB0 #define WS2812B_DMA DMA1 // DMA1 supports SPI1_TX interrupt #define WS2812B_DMA_RCC RCC_DMA1 // follows previous definition #define WS2812B_DMA_CH DMA_CHANNEL3 // only DMA1 channel 3 supports SPI1_TX interrupt