mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-04-05 14:37:02 +00:00
Add an optional RSSI input.
This commit is contained in:
parent
b96413c5af
commit
eafc329cc9
9 changed files with 115 additions and 13 deletions
13
IO.cpp
13
IO.cpp
|
|
@ -61,6 +61,7 @@ const uint16_t DC_OFFSET = 2048U;
|
|||
#define PIN_DSTAR 9
|
||||
#define PIN_DMR 8
|
||||
#define PIN_YSF 7
|
||||
#define PIN_RSSI 88 // ADC on Due pin A8 - Due AD10
|
||||
#define ADC_CHER_Chan (1<<13) // ADC on Due pin A11 - Due AD13 - (1 << 13) (PB20)
|
||||
#define ADC_ISR_EOC_Chan ADC_ISR_EOC13
|
||||
#define ADC_CDR_Chan 13
|
||||
|
|
@ -158,6 +159,11 @@ m_lockout(false)
|
|||
pinMode(PIN_DMR, OUTPUT);
|
||||
pinMode(PIN_YSF, OUTPUT);
|
||||
#endif
|
||||
|
||||
#if defined(SEND_RSSI_DATA)
|
||||
pinMode(PIN_RSSI, INPUT);
|
||||
analogReadResolution(12);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -544,3 +550,10 @@ bool CIO::hasLockout() const
|
|||
return m_lockout;
|
||||
}
|
||||
|
||||
#if defined(SEND_RSSI_DATA)
|
||||
uint16_t CIO::getRSSIValue()
|
||||
{
|
||||
return analogRead(PIN_RSSI);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue