summaryrefslogtreecommitdiff
path: root/digital/beacon
diff options
context:
space:
mode:
authorFlorent Duchon2012-12-18 22:51:58 +0100
committerFlorent Duchon2012-12-24 17:47:58 +0100
commit55b34949dc2bd656c0172f597b913eb5e831d247 (patch)
tree033a49696769bb1a5276e928c9dc289afacc06aa /digital/beacon
parentda701576bbd09ad5691e34148db80e82f59c6484 (diff)
digital/beacon: add color management
Diffstat (limited to 'digital/beacon')
-rw-r--r--digital/beacon/src/misc.c10
-rw-r--r--digital/beacon/src/misc.h9
2 files changed, 19 insertions, 0 deletions
diff --git a/digital/beacon/src/misc.c b/digital/beacon/src/misc.c
index c7bef9d2..f6b6dda8 100644
--- a/digital/beacon/src/misc.c
+++ b/digital/beacon/src/misc.c
@@ -26,6 +26,7 @@
#include "misc.h"
#include "network.h"
+static int8_t color = -1;
/* This function resets the avr using the embedded watchdog */
void reset_avr(void)
{
@@ -56,3 +57,12 @@ void jack_update_status(uint8_t value)
}
}
+void color_set_value(uint8_t value)
+{
+ color = value;
+}
+
+uint8_t color_get_value(void)
+{
+ return color;
+}
diff --git a/digital/beacon/src/misc.h b/digital/beacon/src/misc.h
index faa6ca7a..c5a6f129 100644
--- a/digital/beacon/src/misc.h
+++ b/digital/beacon/src/misc.h
@@ -26,6 +26,9 @@
#ifndef _MISC_H
#define _MISC_H
+#define COLOR_LEFT 1
+#define COLOR_RIGHT 0
+
/* This function resets the avr using the embedded watchdog */
void reset_avr(void);
@@ -35,4 +38,10 @@ void jack_on_off(void);
/* This function sends the jack status to the slave beacons*/
void jack_update_status(uint8_t value);
+void color_set_value(uint8_t value);
+
+uint8_t color_get_value(void);
+
+
+
#endif