changes
This commit is contained in:
11
cube/User/Inc/main2.h
Normal file
11
cube/User/Inc/main2.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef _MAIN2_H_
|
||||
#define _MAIN2_H_
|
||||
|
||||
|
||||
void my_setup_1();
|
||||
void my_setup_2();
|
||||
void my_loop();
|
||||
void my_errorHandler();
|
||||
void SYSTICK_Callback();
|
||||
|
||||
#endif // _MAIN2_H_
|
41
cube/User/Src/main2.c
Normal file
41
cube/User/Src/main2.c
Normal file
@ -0,0 +1,41 @@
|
||||
#include <PontCoopScheduler.h>
|
||||
#include <stdlib.h>
|
||||
#include <main.h>
|
||||
|
||||
|
||||
void my_setup_2() {
|
||||
|
||||
}
|
||||
|
||||
void my_errorHandler() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void blinkRed(void *handle) {
|
||||
HAL_GPIO_TogglePin(LED_Red_GPIO_Port, LED_Red_Pin);
|
||||
}
|
||||
|
||||
void blinkGreen(void *handle) {
|
||||
HAL_GPIO_TogglePin(LED_Green_GPIO_Port, LED_Green_Pin);
|
||||
}
|
||||
|
||||
void blinkBlue(void *handle) {
|
||||
HAL_GPIO_TogglePin(LED_Blue_GPIO_Port, LED_Blue_Pin);
|
||||
}
|
||||
|
||||
void my_setup_1() {
|
||||
schInit();
|
||||
schAdd(blinkBlue, NULL, 0, 250);
|
||||
schAdd(blinkRed, NULL, 0, 500);
|
||||
schAdd(blinkGreen, NULL, 0, 1000);
|
||||
}
|
||||
|
||||
void my_loop() {
|
||||
schExec();
|
||||
}
|
||||
|
||||
void SYSTICK_Callback() {
|
||||
schUpdate();
|
||||
}
|
Reference in New Issue
Block a user