diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2015-06-30 13:36:15 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-07-09 09:13:41 -0700 |
commit | d9656de88f7af77b39bfe9985f0ac7c623932d71 (patch) | |
tree | ed83e5b72fa8c2afd25410ce6e1bece5621896cd /firmware/octoclock/include/state.h | |
parent | 1449687bb41e9cd39cc3d94413c993a1ec553251 (diff) | |
download | uhd-d9656de88f7af77b39bfe9985f0ac7c623932d71.tar.gz uhd-d9656de88f7af77b39bfe9985f0ac7c623932d71.tar.bz2 uhd-d9656de88f7af77b39bfe9985f0ac7c623932d71.zip |
OctoClock bugfixes
* Bumped compatibility version to 3
* firmware: Ethernet, clkdist bugfixes
* lib: fixed invalid rev detection
Diffstat (limited to 'firmware/octoclock/include/state.h')
-rw-r--r-- | firmware/octoclock/include/state.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/firmware/octoclock/include/state.h b/firmware/octoclock/include/state.h index 9734948cf..2170c2638 100644 --- a/firmware/octoclock/include/state.h +++ b/firmware/octoclock/include/state.h @@ -22,23 +22,24 @@ #include <octoclock.h> -// NOT PRESENT unless proven so... -static ref_t global_which_ref = NO_REF; -static bool global_gps_present = false; -static bool global_ext_ref_is_present = false; +// Global state variables +extern volatile bool g_ext_ref_present; +extern volatile bool g_gps_present; +extern volatile switch_pos_t g_switch_pos; +extern volatile ref_t g_ref; -void led(LEDs which, int turn_it_on); +typedef enum { + LED_TOP, // Internal + LED_MIDDLE, // External + LED_BOTTOM // Status +} led_t; -void LEDs_off(void); +void led(led_t which, bool on); -void force_internal(void); +void leds_off(void); void prefer_internal(void); void prefer_external(void); -ref_t which_ref(void); - -switch_pos_t get_switch_pos(void); - #endif /* _STATE_H_ */ |