frontend adc stuff

This commit is contained in:
2020-10-31 21:25:49 +01:00
parent 877dd0fca3
commit 95af24a12a
11 changed files with 119 additions and 7 deletions

View File

@ -5,6 +5,7 @@
#include <main.h>
#include <usart.h>
#include <adc.h>
#include <PontCoopScheduler.h>
@ -12,11 +13,13 @@
#include <loopCtrl.h>
#include <mbusComm.h>
#include <logger.h>
#include <frontend.h>
void my_setup_1() {
schInit();
logInit();
// frontendInit();
}
void my_errorHandler() {
@ -35,7 +38,7 @@ void my_setup_2() {
led(RED, OFF);
led(GREEN, ON);
schAdd(helloMeterbus, NULL, 0, 2000);
schAdd(helloMeterbus, NULL, 0, 10000);
}
void my_loop() {
@ -52,3 +55,10 @@ void HAL_GPIO_EXTI_Callback(uint16_t pin) {
loopStatusCallback();
}
}
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc) {
if (hadc == &frontendAdc) {
frontendAdcCallback(hadc);
}
}