mirror of https://github.com/rusefi/rusefi.git
OpenBLT yellow blinker https://github.com/rusefi/rusefi/issues/5901
This commit is contained in:
parent
21e698f951
commit
3f65783849
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue