aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/includes/Core
diff options
context:
space:
mode:
authorMaximilien Cuony <maximilien@theglu.org>2016-06-06 18:49:25 +0200
committerMaximilien Cuony <maximilien@theglu.org>2016-06-06 18:49:25 +0200
commite2e1af13be32fe00f98135beb62617ea0bba7bc8 (patch)
tree5ff81acadb2f5b9d7fee2269d746253a1f6bad49 /src/common/includes/Core
parent2e4b80bc0fdae03f6e00b76000c16d12682e0479 (diff)
downloadglutte-o-matic-e2e1af13be32fe00f98135beb62617ea0bba7bc8.tar.gz
glutte-o-matic-e2e1af13be32fe00f98135beb62617ea0bba7bc8.tar.bz2
glutte-o-matic-e2e1af13be32fe00f98135beb62617ea0bba7bc8.zip
Fix warnings, add more warnings flags, normalize makefiles
Diffstat (limited to 'src/common/includes/Core')
-rw-r--r--src/common/includes/Core/common.h5
-rw-r--r--src/common/includes/Core/fsm.h10
2 files changed, 13 insertions, 2 deletions
diff --git a/src/common/includes/Core/common.h b/src/common/includes/Core/common.h
index 950085c..b0927c8 100644
--- a/src/common/includes/Core/common.h
+++ b/src/common/includes/Core/common.h
@@ -58,6 +58,11 @@ int random_bool(void);
#define FAULT_SOURCE_USART 4
void trigger_fault(int source);
+
+int find_last_sunday(const struct tm*);
+
#ifdef SIMULATOR
void __disable_irq(void);
+#else
+void hard_fault_handler_c(uint32_t *);
#endif
diff --git a/src/common/includes/Core/fsm.h b/src/common/includes/Core/fsm.h
index c061597..75f1f46 100644
--- a/src/common/includes/Core/fsm.h
+++ b/src/common/includes/Core/fsm.h
@@ -25,6 +25,8 @@
#ifndef _FSM_H_
#define _FSM_H_
+#include <stdint.h>
+
// List of all states the FSM of the relay can be in
enum fsm_state_e {
FSM_OISIF = 0, // Idle
@@ -88,10 +90,10 @@ struct fsm_output_signals_t {
};
// Initialise local structures
-void fsm_init();
+void fsm_init(void);
// Call the FSM once and update the internal state
-void fsm_update();
+void fsm_update(void);
// Setter for inputs
void fsm_update_inputs(struct fsm_input_signals_t* inputs);
@@ -102,5 +104,9 @@ void fsm_get_outputs(struct fsm_output_signals_t* out);
// Announce a state change
void fsm_state_switched(const char *new_state);
+uint64_t fsm_current_state_time_ms(void);
+uint64_t fsm_current_state_time_s(void);
+const char* fsm_select_letter(void);
+
#endif // _FSM_H_