Browse Source

Update docs

pull/23355/head
fauxpark 1 month ago
parent
commit
6e06292a1d
1 changed files with 39 additions and 8 deletions
  1. +39
    -8
      docs/apa102_driver.md

+ 39
- 8
docs/apa102_driver.md View File

@ -26,20 +26,51 @@ Add the following to your `config.h`:
## API :id=api
### `void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds)`
### `void apa102_init(void)` :id=api-apa102-init
Send RGB data to the APA102 LED chain.
Initialize the LED driver. This function should be called first.
#### Arguments :id=api-apa102-setleds-arguments
---
### `void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue)` :id=api-apa102-set-color
Set the color of a single LED. This function does not immediately update the LEDs; call `apa102_flush()` after you are finished.
#### Arguments :id=api-apa102-set-color-arguments
- `uint16_t index`
The LED index in the APA102 chain.
- `uint8_t red`
The red value to set.
- `uint8_t green`
The green value to set.
- `uint8_t blue`
The blue value to set.
---
### `void apa102_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` :id=api-apa102-set-color-all
Set the color of all LEDs.
#### Arguments :id=api-apa102-set-color-all-arguments
- `uint8_t red`
The red value to set.
- `uint8_t green`
The green value to set.
- `uint8_t blue`
The blue value to set.
---
### `void apa102_flush(void)` :id=api-apa102-flush
- `rgb_led_t *start_led`
A pointer to the LED array.
- `uint16_t num_leds`
The length of the LED array.
Flush the PWM values to the LED chain.
---
### `void apa102_set_brightness(uint8_t brightness)`
### `void apa102_set_brightness(uint8_t brightness)` :id=api-apa102-set-brightness
Set the global brightness.


Loading…
Cancel
Save