diff options
Diffstat (limited to 'platforms/chibios/drivers/ws2812.c')
| -rw-r--r-- | platforms/chibios/drivers/ws2812.c | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/platforms/chibios/drivers/ws2812.c b/platforms/chibios/drivers/ws2812.c index 7e870661de..1b3bb59842 100644 --- a/platforms/chibios/drivers/ws2812.c +++ b/platforms/chibios/drivers/ws2812.c @@ -10,7 +10,7 @@  #        define NOP_FUDGE 0.4  #    else  #        error("NOP_FUDGE configuration required") -#        define NOP_FUDGE 1  // this just pleases the compile so the above error is easier to spot +#        define NOP_FUDGE 1 // this just pleases the compile so the above error is easier to spot  #    endif  #endif @@ -25,12 +25,12 @@  // The reset gap can be 6000 ns, but depending on the LED strip it may have to be increased  // to values like 600000 ns. If it is too small, the pixels will show nothing most of the time.  #ifndef WS2812_RES -#    define WS2812_RES (1000 * WS2812_TRST_US)  // Width of the low gap between bits to cause a frame to latch +#    define WS2812_RES (1000 * WS2812_TRST_US) // Width of the low gap between bits to cause a frame to latch  #endif  #define NUMBER_NOPS 6  #define CYCLES_PER_SEC (CPU_CLOCK / NUMBER_NOPS * NOP_FUDGE) -#define NS_PER_SEC (1000000000L)  // Note that this has to be SIGNED since we want to be able to check for negative values of derivatives +#define NS_PER_SEC (1000000000L) // Note that this has to be SIGNED since we want to be able to check for negative values of derivatives  #define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC)  #define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE) @@ -67,7 +67,9 @@ void sendByte(uint8_t byte) {      }  } -void ws2812_init(void) { palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE); } +void ws2812_init(void) { +    palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE); +}  // Setleds for standard RGB  void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { | 
