Skip to content
Snippets Groups Projects
Verified Commit fb6bb64c authored by Gerd's avatar Gerd
Browse files

[epicardium] refactor LED to be in own module

parent 1a693480
No related branches found
No related tags found
1 merge request!13[epicardium] refactor LED to be in own module [MANUAL MERGE]
......@@ -12,6 +12,7 @@ API(API_UART_WRITE, void epic_uart_write_str(const char*str, intptr_t length));
#define API_UART_READ 0x2
API(API_UART_READ, char epic_uart_read_chr(void));
// set LED color of led $led to color rgb
#define API_LEDS_SET 0x3
API(API_LEDS_SET, void epic_leds_set(int led, uint8_t r, uint8_t g, uint8_t b));
......
......@@ -16,13 +16,6 @@
TaskHandle_t dispatcher_task_id;
/* TODO: Move out of main.c */
void epic_leds_set(int led, uint8_t r, uint8_t g, uint8_t b)
{
leds_set(led, r, g, b);
leds_update();
}
/*
* API dispatcher task. This task will sleep until an API call is issued and
* then wake up to dispatch it.
......
......@@ -67,6 +67,7 @@ elf = executable(
'main.c',
'serial.c',
'support.c',
'modules/leds.c',
dependencies: [libcard10, max32665_startup_core0, maxusb],
link_with: [api_dispatcher_lib, freertos],
link_whole: [max32665_startup_core0_lib, board_card10_lib],
......
#include "leds.h"
void epic_leds_set(int led, uint8_t r, uint8_t g, uint8_t b)
{
leds_set(led, r, g, b);
leds_update();
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment