Skip to content

Commit

Permalink
Change uint16_t to int, so it should fixed compile issue for APA102
Browse files Browse the repository at this point in the history
  • Loading branch information
HorrorTroll committed Jan 7, 2025
1 parent c64a794 commit eb213cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/led/apa102.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void apa102_init(void) {
gpio_set_pin_output(APA102_CI_PIN);
}

void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue) {
void apa102_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
apa102_leds[index].r = red;
apa102_leds[index].g = green;
apa102_leds[index].b = blue;
Expand Down
2 changes: 1 addition & 1 deletion drivers/led/apa102.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#define APA102_MAX_BRIGHTNESS 31

void apa102_init(void);
void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue);
void apa102_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
void apa102_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
void apa102_flush(void);

Expand Down

0 comments on commit eb213cc

Please sign in to comment.