1
0
Fork 0

APA102: API rework (#23355)

This commit is contained in:
Ryan 2024-06-13 22:19:45 +10:00 committed by GitHub
parent c4a74be7f0
commit 55538b2e1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 70 additions and 29 deletions

View file

@ -32,17 +32,8 @@
#define APA102_MAX_BRIGHTNESS 31
void apa102_init(void);
/* User Interface
*
* Input:
* start_led: An array of GRB data describing the LED colors
* num_leds: The number of LEDs to write
*
* The functions will perform the following actions:
* - Set the data-out pin as output
* - Send out the LED data
*/
void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds);
void apa102_set_color(uint16_t 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);
void apa102_set_brightness(uint8_t brightness);