show the time on a LED strip
More...
Go to the source code of this file.
|
int | _write (int file, char *ptr, int len) |
| default printf output
|
|
char * | b2s (uint64_t binary, uint8_t rjust) |
| get binary representation of a number More...
|
|
static void | clock_clear (void) |
| switch off all clock LEDs More...
|
|
static void | clock_show_time (uint32_t time) |
| show time on LED clock More...
|
|
static void | clock_leds_set (void) |
| set the LEDs More...
|
|
static void | clock_set_time (uint32_t time) |
| set the time on the LEDs More...
|
|
static void | clock_animate_time (uint32_t time) |
| incrementally set the time on the LEDs More...
|
|
static void | clock_hours (void) |
| show animation with fading hours mark on clock LEDs
|
|
static void | process_command (char *str) |
| process user command More...
|
|
int | main (void) |
| program entry point this is the firmware function started by the micro-controller
|
|
void | adc1_2_isr (void) |
| interrupt service routine called when ADC conversion completed
|
|
void | rtc_isr (void) |
| interrupt service routine called when tick passed on RTC
|
|
show the time on a LED strip
- Author
- King Kévin kingk.nosp@m.evin.nosp@m.@cuvo.nosp@m.odoo.nosp@m..info
- Date
- 2016
Definition in file main.c.
char* b2s |
( |
uint64_t |
binary, |
|
|
uint8_t |
rjust |
|
) |
| |
get binary representation of a number
- Parameters
-
[in] | binary | number to represent in binary |
[in] | rjust | justify representation with leading zeros |
- Returns
- string with binary representation of the number
Definition at line 146 of file main.c.
static void clock_animate_time |
( |
uint32_t |
time | ) |
|
|
static |
incrementally set the time on the LEDs
this will have an animation where time is incremented until it reaches the provided time
- Parameters
-
Definition at line 282 of file main.c.
static void clock_clear |
( |
void |
| ) |
|
|
static |
switch off all clock LEDs
- Note
- LEDs need to be set separately
Definition at line 171 of file main.c.
static void clock_leds_set |
( |
void |
| ) |
|
|
static |
set the LEDs
set the LED colors on WS2812B LEDs
- Note
- WS2812B LED color values need to be transmitted separately
Definition at line 261 of file main.c.
static void clock_set_time |
( |
uint32_t |
time | ) |
|
|
static |
set the time on the LEDs
- Parameters
-
Definition at line 271 of file main.c.
static void clock_show_time |
( |
uint32_t |
time | ) |
|
|
static |
show time on LED clock
- Parameters
-
show hours and minutes progress as full arcs, show second position as marker. the brightness of the LED shows the progress of the unit. hours are blue, minutes green, seconds red
- Note
- LEDs need to be set separately
Definition at line 184 of file main.c.
static void process_command |
( |
char * |
str | ) |
|
|
static |
process user command
- Parameters
-
[in] | str | user command string (\0 ended) |
Definition at line 327 of file main.c.