diff --git a/src/button.h b/src/button.h index 69ec53c..352354a 100644 --- a/src/button.h +++ b/src/button.h @@ -11,7 +11,7 @@ #include -extern uint32_t BUTTON_CYCLE; +extern const uint32_t BUTTON_CYCLE; typedef enum { BUTTONS_FIRST, diff --git a/src/eggTimer.h b/src/eggTimer.h index 21274f2..3195e4b 100644 --- a/src/eggTimer.h +++ b/src/eggTimer.h @@ -11,6 +11,9 @@ #include +extern const uint32_t EGG_TIMER_CYCLE; + + void eggTimerInit(void *handleArg); void eggTimerExec(void *handleArg); diff --git a/src/main.c b/src/main.c index 0adac1c..23af023 100644 --- a/src/main.c +++ b/src/main.c @@ -17,6 +17,7 @@ #include "PontCoopScheduler.h" #include "measure.h" #include "eggTimer.h" +#include "button.h" @@ -42,11 +43,13 @@ int main() { measureInit(NULL); displayMuxerInit(NULL); eggTimerInit(NULL); + buttonInit(NULL); // schAdd(displayExec, NULL, 0, DISPLAY_CYCLE); schAdd(measureStartConversion, NULL, 0, MEASURE_CYCLE); schAdd(displayMuxerExec, NULL, 0, DISPLAY_MUXER_CYCLE); schAdd(eggTimerExec, NULL, 0, EGG_TIMER_CYCLE); + schAdd(buttonExec, NULL, 0, BUTTON_CYCLE); __enable_interrupt();