mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-04-06 06:55:05 +00:00
Adding LEDs selftest at start-up
This commit is contained in:
parent
cce2cc3cfc
commit
70e1fd4264
5 changed files with 66 additions and 1 deletions
32
IO.cpp
32
IO.cpp
|
|
@ -94,6 +94,38 @@ m_lockout(false)
|
|||
m_boxcarFilter.pCoeffs = BOXCAR_FILTER;
|
||||
|
||||
initInt();
|
||||
|
||||
selfTest();
|
||||
}
|
||||
|
||||
void CIO::selfTest()
|
||||
{
|
||||
bool ledValue = false;
|
||||
uint32_t ledCount = 0;
|
||||
uint32_t blinks = 0;
|
||||
|
||||
while(true) {
|
||||
ledCount++;
|
||||
delayInt(100);
|
||||
|
||||
if(ledCount >= 2U) {
|
||||
ledCount = 0U;
|
||||
ledValue = !ledValue;
|
||||
|
||||
setLEDInt(ledValue);
|
||||
setPTTInt(ledValue);
|
||||
setDStarInt(ledValue);
|
||||
setDMRInt(ledValue);
|
||||
setYSFInt(ledValue);
|
||||
setP25Int(ledValue);
|
||||
setCOSInt(ledValue);
|
||||
|
||||
blinks++;
|
||||
|
||||
if(blinks > 5)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CIO::start()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue