mirror of
https://github.com/juribeparada/MMDVM_HS.git
synced 2026-04-05 06:15:15 +00:00
Adding LEDs selftest blink
This commit is contained in:
parent
c74b374636
commit
2befa42405
2 changed files with 59 additions and 26 deletions
34
IO.cpp
34
IO.cpp
|
|
@ -57,10 +57,42 @@ m_watchdog(0U)
|
|||
SCLK_pin(LOW);
|
||||
SDATA_pin(LOW);
|
||||
SLE_pin(LOW);
|
||||
|
||||
|
||||
selfTest();
|
||||
|
||||
m_modeTimerCnt = 0;
|
||||
}
|
||||
|
||||
void CIO::selfTest()
|
||||
{
|
||||
bool ledValue = false;
|
||||
uint32_t ledCount = 0;
|
||||
uint32_t blinks = 0;
|
||||
|
||||
while(true) {
|
||||
ledCount++;
|
||||
delay_us(1000);
|
||||
|
||||
if(ledCount >= 125U) {
|
||||
ledCount = 0U;
|
||||
ledValue = !ledValue;
|
||||
|
||||
LED_pin(!ledValue);
|
||||
PTT_pin(ledValue);
|
||||
DSTAR_pin(ledValue);
|
||||
DMR_pin(ledValue);
|
||||
YSF_pin(ledValue);
|
||||
P25_pin(ledValue);
|
||||
COS_pin(ledValue);
|
||||
|
||||
blinks++;
|
||||
|
||||
if(blinks > 5)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CIO::process()
|
||||
{
|
||||
uint8_t bit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue