This commit is contained in:
andreika-git 2024-02-01 23:28:43 +02:00 committed by rusefillc
parent 21e698f951
commit 3f65783849
1 changed files with 24 additions and 0 deletions

View File

@ -8,12 +8,36 @@ extern "C" {
#include "shared_params.h"
}
class BlinkyThread : public chibios_rt::BaseStaticThread<256> {
protected:
void main(void) override {
Gpio yellow = getWarningLedPin();
efiSetPadMode("yellow", yellow, PAL_MODE_OUTPUT_PUSHPULL);
auto yellowPort = getBrainPinPort(yellow);
auto yellowPin = getBrainPinIndex(yellow);
palSetPad(yellowPort, yellowPin);
while (true) {
palTogglePad(yellowPort, yellowPin);
chThdSleepMilliseconds(250);
}
}
};
static BlinkyThread blinky;
int main(void) {
halInit();
chSysInit();
baseMCUInit();
// start the blinky thread
blinky.start(NORMALPRIO + 10);
// Init openblt shared params
SharedParamsInit();