File tree Expand file tree Collapse file tree
Lib/FancyLayers-RENAME/NeoPixel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,12 @@ typedef enum {
2525 GPIO_PIN_15 = LL_GPIO_PIN_15
2626} GPIO_Pins ;
2727
28- typedef enum {GPIOA , GPIOB , GPIOC , GPIOD } GPIO_Port ;
28+ typedef enum {
29+ GPIOA ,
30+ GPIOB ,
31+ GPIOC ,
32+ GPIOD
33+ } GPIO_Port ;
2934
3035/// @brief Alternate function for a specific pin and specific port
3136// Technically can be set for AF 0-15 for low and high registers separately
@@ -69,7 +74,7 @@ typedef struct {
6974 uint32_t NumberOfNeopixels ;
7075 GPIO_Pins gpio_pin ;
7176 GPIO_Alternate_Function alternate_function ;
72- GPIO_Port gpio_port ;
77+ GPIO_Port gpio_port ;
7378 // TODO - Add fields for GPIO pin, SPI settings, etc.
7479 //
7580} NeopixelConfig ;
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ NeopixelContext *Neopixel_Setup(NeopixelConfig *neopixelConfiguration)
6060 .Pull = LL_GPIO_PULL_NO ,
6161 .Alternate = neopixelConfiguration -> alternate_function ,
6262 };
63- LL_AHB2_GRP1_EnableClock (LL_AHB2_GRP1_PERIPH_GPIOB ); //Only SPI1 takes AHB2, SPI2 and 3 take AHB1
63+ LL_AHB2_GRP1_EnableClock (LL_AHB2_GRP1_PERIPH_GPIOB ); // Only SPI1 takes AHB2, SPI2 and 3 take AHB1
6464 LL_GPIO_Init (neopixelConfiguration -> gpio_port , & copi_pin );
6565
6666 LL_SPI_InitTypeDef spi = {
@@ -75,7 +75,7 @@ NeopixelContext *Neopixel_Setup(NeopixelConfig *neopixelConfiguration)
7575 .CRCCalculation = LL_SPI_CRCCALCULATION_DISABLE ,
7676 .CRCPoly = 7 ,
7777 };
78- LL_APB2_GRP1_EnableClock (LL_APB2_GRP1_PERIPH_SPI1 );// Enable clock twice (see line 64)
78+ LL_APB2_GRP1_EnableClock (LL_APB2_GRP1_PERIPH_SPI1 ); // Enable clock twice (see line 64)
7979 LL_SPI_Init (neopixelConfiguration -> SPI_Instance , & spi );
8080 LL_SPI_SetStandard (neopixelConfiguration -> SPI_Instance , LL_SPI_PROTOCOL_MOTOROLA );
8181 LL_SPI_EnableNSSPulseMgt (neopixelConfiguration -> SPI_Instance );
You can’t perform that action at this time.
0 commit comments