mirror of
https://github.com/QuantumLeaps/qpc.git
synced 2025-01-14 06:43:19 +08:00
21 lines
443 B
C
21 lines
443 B
C
QState Blinky_off(Blinky * const me, QEvt const * const e) {
|
|
QState status;
|
|
switch (e->sig) {
|
|
case Q_ENTRY_SIG: {
|
|
BSP_ledOff();
|
|
status = Q_HANDLED();
|
|
break;
|
|
}
|
|
case TIMEOUT_SIG: {
|
|
status = Q_TRAN(&Blinky_on); /*<== */
|
|
break;
|
|
}
|
|
default: {
|
|
status = Q_SUPER(&QHsm_top);
|
|
break;
|
|
}
|
|
}
|
|
return status;
|
|
}
|
|
|