Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Jeff Gough
firmware
Commits
ddebc93c
Commit
ddebc93c
authored
5 years ago
by
trilader
Browse files
Options
Downloads
Patches
Plain Diff
feat(epicardium): Add API function to clear all LEDs to a single color
parent
3e886c50
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
epicardium/epicardium.h
+10
-0
10 additions, 0 deletions
epicardium/epicardium.h
epicardium/modules/leds.c
+13
-0
13 additions, 0 deletions
epicardium/modules/leds.c
with
23 additions
and
0 deletions
epicardium/epicardium.h
+
10
−
0
View file @
ddebc93c
...
@@ -84,6 +84,7 @@ typedef _Bool bool;
...
@@ -84,6 +84,7 @@ typedef _Bool bool;
#define API_LEDS_SET_ALL 0x6a
#define API_LEDS_SET_ALL 0x6a
#define API_LEDS_SET_ALL_HSV 0x6b
#define API_LEDS_SET_ALL_HSV 0x6b
#define API_LEDS_SET_GAMMA_TABLE 0x6c
#define API_LEDS_SET_GAMMA_TABLE 0x6c
#define API_LEDS_CLEAR_ALL 0x6d
#define API_VIBRA_SET 0x70
#define API_VIBRA_SET 0x70
#define API_VIBRA_VIBRATE 0x71
#define API_VIBRA_VIBRATE 0x71
...
@@ -648,6 +649,15 @@ API(API_LEDS_SET_GAMMA_TABLE, void epic_leds_set_gamma_table(
...
@@ -648,6 +649,15 @@ API(API_LEDS_SET_GAMMA_TABLE, void epic_leds_set_gamma_table(
uint8_t
*
gamma_table
uint8_t
*
gamma_table
));
));
/**
* Set all LEDs to a certain RGB color.
*
* :param uint8_t r: Value for the red color channel.
* :param uint8_t g: Value for the green color channel.
* :param uint8_t b: Value for the blue color channel.
*/
API
(
API_LEDS_CLEAR_ALL
,
void
epic_leds_clear_all
(
uint8_t
r
,
uint8_t
g
,
uint8_t
b
));
/**
/**
* Sensor Data Streams
* Sensor Data Streams
* ===================
* ===================
...
...
This diff is collapsed.
Click to expand it.
epicardium/modules/leds.c
+
13
−
0
View file @
ddebc93c
...
@@ -87,3 +87,16 @@ void epic_leds_set_gamma_table(uint8_t rgb_channel, uint8_t gamma_table[256])
...
@@ -87,3 +87,16 @@ void epic_leds_set_gamma_table(uint8_t rgb_channel, uint8_t gamma_table[256])
{
{
leds_set_gamma_table
(
rgb_channel
,
gamma_table
);
leds_set_gamma_table
(
rgb_channel
,
gamma_table
);
}
}
void
epic_leds_clear_all
(
uint8_t
r
,
uint8_t
g
,
uint8_t
b
)
{
for
(
int
i
=
0
;
i
<
NUM_LEDS
;
i
++
)
{
if
(
i
==
PERSONAL_STATE_LED
&&
personal_state_enabled
)
continue
;
leds_prep
(
i
,
r
,
g
,
b
);
}
leds_update_power
();
leds_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