Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
flow3r
flow3r firmware
Commits
2ca7b35a
Commit
2ca7b35a
authored
1 year ago
by
moon2
Committed by
q3k
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
leds: documentation
parent
1bc272a3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/badge23/include/badge23/leds.h
+28
-0
28 additions, 0 deletions
components/badge23/include/badge23/leds.h
with
28 additions
and
0 deletions
components/badge23/include/badge23/leds.h
+
28
−
0
View file @
2ca7b35a
...
...
@@ -2,17 +2,45 @@
#include
<stdint.h>
#include
<stdbool.h>
/* inits stuff ig
*/
void
leds_init
();
/* Set a single/all LEDs to change color with the next (auto) update. Index starts above
* USB-C port and increments ccw. There are 8 LEDs per top petal.
*/
void
leds_set_single_rgb
(
uint8_t
index
,
uint8_t
red
,
uint8_t
green
,
uint8_t
blue
);
void
leds_set_single_hsv
(
uint8_t
index
,
float
hue
,
float
sat
,
float
value
);
void
leds_set_all_rgb
(
uint8_t
red
,
uint8_t
green
,
uint8_t
blue
);
void
leds_set_all_hsv
(
float
hue
,
float
sat
,
float
value
);
/* Set/get global LED brightness. Default 69.
*/
void
leds_set_brightness
(
uint8_t
brightness
);
uint8_t
leds_get_brightness
();
/* Set/get maximum change rate of brightness. Set to 1-3 for fade effects, set to
* 255 to disable. Currently clocks at 10Hz.
*/
void
leds_set_slew_rate
(
uint8_t
slew_rate
);
uint8_t
leds_get_slew_rate
();
/* Update LEDs.
*/
void
leds_update
();
/* Used internally for slew rate animation loop.
*/
void
leds_update_hardware
();
/* Bend the rgb curves with an exponent each. (1,1,1) is default, (2,2,2) works well too
* If someone wants to do color calibration, this is ur friend
*/
void
leds_set_gamma
(
float
red
,
float
green
,
float
blue
);
/* leds_update is periodically called by the background task for slew rate animation when
* set to 1. This adds user changes immediately. Useful with low slew rates.
*/
void
leds_set_auto_update
(
bool
on
);
bool
leds_get_auto_update
();
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment