Verified Commit be441873 authored by Rahix's avatar Rahix

fix(ws2812): Fix compiler warnings

@danb, when introducing the inline functions as macro replacements you
misdeclared some parameter types.  I've fixed it now :)
Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
parent 5663fd18
......@@ -11,11 +11,11 @@
#define OVERHEAD 33
#define EPIC_WS2812_ZERO_HIGH_TICKS 34 - OVERHEAD
#define EPIC_WS2812_ZERO_LOW_TICKS 86 - OVERHEAD
#define EPIC_WS2812_ONE_HIGH_TICKS 86 - OVERHEAD
#define EPIC_WS2812_ONE_LOW_TICKS 34 - OVERHEAD
#define EPIC_WS2812_RESET_TCKS 4800 - OVERHEAD
#define EPIC_WS2812_ZERO_HIGH_TICKS (34 - OVERHEAD)
#define EPIC_WS2812_ZERO_LOW_TICKS (86 - OVERHEAD)
#define EPIC_WS2812_ONE_HIGH_TICKS (86 - OVERHEAD)
#define EPIC_WS2812_ONE_LOW_TICKS (34 - OVERHEAD)
#define EPIC_WS2812_RESET_TCKS (4800 - OVERHEAD)
static volatile uint32_t counter = 0;
......@@ -28,7 +28,7 @@ epic_ws2812_delay_ticks(uint32_t ticks)
}
static inline __attribute__((always_inline)) void
epic_ws2812_transmit_bit(uint32_t pin, uint8_t bit)
epic_ws2812_transmit_bit(gpio_cfg_t *pin, uint8_t bit)
{
if (bit != 0) {
GPIO_OutSet(pin);
......@@ -44,7 +44,7 @@ epic_ws2812_transmit_bit(uint32_t pin, uint8_t bit)
}
static inline __attribute__((always_inline)) void
epic_ws2812_transmit_byte(uint32_t pin, uint8_t byte)
epic_ws2812_transmit_byte(gpio_cfg_t *pin, uint8_t byte)
{
epic_ws2812_transmit_bit(pin, byte & 0b10000000);
epic_ws2812_transmit_bit(pin, byte & 0b01000000);
......@@ -69,7 +69,7 @@ void epic_ws2812_write(uint8_t pin, uint8_t *pixels, uint32_t n_bytes)
epic_ws2812_transmit_byte(pin_cfg, *pixels);
} while (++pixels != pixels_end);
GPIO_OutClr(pin);
GPIO_OutClr(pin_cfg);
epic_ws2812_delay_ticks(EPIC_WS2812_RESET_TCKS);
taskEXIT_CRITICAL();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment