aboutsummaryrefslogtreecommitdiff
path: root/robot/hypervisor.h
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-06-02 17:22:48 +0200
committerlonkaars <loek@pipeframe.xyz>2022-06-02 17:22:48 +0200
commit14779cb187dac9ed4a0b6e7645e76e78587ad024 (patch)
treeae523d0216d0d9dce7155296bbe915a6f8f22c22 /robot/hypervisor.h
parent052be3db6fbb855be63e95291a270ba707796739 (diff)
ping working
Diffstat (limited to 'robot/hypervisor.h')
-rw-r--r--robot/hypervisor.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/robot/hypervisor.h b/robot/hypervisor.h
index 589d324..59398c6 100644
--- a/robot/hypervisor.h
+++ b/robot/hypervisor.h
@@ -4,9 +4,13 @@
#include <stdint.h>
+#include "../shared/bool.h"
+
/** amount of parallel timers */
#define W2_HYPERVISOR_TIMER_COUNT (1)
+#define W2_TIMER_PING (0)
+
extern uint64_t g_w2_hypervisor_cycles;
extern uint64_t g_w2_hypervisor_uptime_ms;
@@ -15,10 +19,16 @@ extern unsigned long g_w2_hypervisor_ema_errcatch_ms;
extern unsigned long g_w2_hypervisor_ema_io_ms;
extern unsigned long g_w2_hypervisor_ema_mode_ms;
+extern unsigned int g_w2_ping_ms;
+extern uint8_t g_w2_ping_id;
+extern bool g_w2_ping_received;
+extern bool g_w2_ping_timeout;
+extern bool g_w2_connected;
+
/**
* backbone of all other modules
*
- * stores global variables and controls when other modules run
+ * stores global state and controls when other modules run
*/
void w2_hypervisor_main();
@@ -26,3 +36,4 @@ void w2_hypervisor_main();
void w2_hypervisor_time_start(uint8_t label);
/** stop timer with label `label` */
uint64_t w2_hypervisor_time_end(uint8_t label);
+