refactor signaling with led and debug pins

This commit is contained in:
2020-11-01 22:15:04 +01:00
parent 99addddede
commit b7f32a6bf6
9 changed files with 53 additions and 103 deletions

View File

@ -9,20 +9,19 @@
#include <PontCoopScheduler.h>
#include <led.h>
#include <signal.h>
#include <loopCtrl.h>
#include <mbusComm.h>
#include <logger.h>
#include <frontend.h>
void my_setup_1() {
schInit();
logInit();
}
void my_errorHandler() {
led(RED, ON);
signal(LED_RED, ON);
}
void helloMeterbus(void *handle) {
@ -34,17 +33,17 @@ void helloMeterbus(void *handle) {
void my_setup_2() {
led(RED, OFF);
led(GREEN, ON);
signal(LED_RED, OFF);
signal(LED_GREEN, ON);
frontendInit();
frontendSetThreshold(240);
schAdd(helloMeterbus, NULL, 0, 1000);
}
void my_loop() {
HAL_GPIO_TogglePin(Debug_Signal_2_GPIO_Port, Debug_Signal_2_Pin);
signal(DEBUG_1, TOGGLE);
schExec();
logExec();