led control

This commit is contained in:
Wolfgang Hottgenroth
2018-01-18 15:06:37 +01:00
parent 4ee20b974a
commit 36ce69de93
100 changed files with 8151 additions and 8695 deletions

32
my_src/counter.c Normal file
View File

@ -0,0 +1,32 @@
/* counter.c
*
* Created on: Jan 17, 2018
* Author: wn
*/
#include "counter.h"
#include "stm32f1xx_hal.h"
#include <PontCoopScheduler.h>
#include <diag/Trace.h>
extern TIM_HandleTypeDef htim2;
extern TIM_HandleTypeDef htim1;
void counterExec(void *handle) {
trace_printf("counterExec\n");
volatile uint32_t cnt = __HAL_TIM_GET_COUNTER(&htim2);
trace_printf("%d\n", cnt);
}
void counterInit() {
HAL_TIM_Base_Start(&htim2);
schAdd(counterExec, NULL, 0, 100);
}