From dba137dc4ec11f695f853d643fd8621500b7d9b0 Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Wed, 16 May 2012 17:03:14 +0200 Subject: digital/beacon: import jack_update_status API --- digital/beacon/src/misc.c | 11 +++++++++++ digital/beacon/src/misc.h | 3 +++ 2 files changed, 14 insertions(+) diff --git a/digital/beacon/src/misc.c b/digital/beacon/src/misc.c index 04db1de5..c7bef9d2 100644 --- a/digital/beacon/src/misc.c +++ b/digital/beacon/src/misc.c @@ -45,3 +45,14 @@ void jack_on_off(void) } +/* This function sends the jack status to the slave beacons*/ +void jack_update_status(uint8_t value) +{ + uint8_t old_jack = 0; + if(value != old_jack) + { + network_send_data(NETWORK_JACK_STATE,value); + old_jack = value; + } +} + diff --git a/digital/beacon/src/misc.h b/digital/beacon/src/misc.h index 95bba519..faa6ca7a 100644 --- a/digital/beacon/src/misc.h +++ b/digital/beacon/src/misc.h @@ -32,4 +32,7 @@ void reset_avr(void); /* This function simulates the jack's state and send it over the air */ void jack_on_off(void); +/* This function sends the jack status to the slave beacons*/ +void jack_update_status(uint8_t value); + #endif -- cgit v1.2.3