mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-04-05 06:26:42 +00:00
Add the DMR Abort command.
This commit is contained in:
parent
195f94c368
commit
4dbcfd6b04
3 changed files with 31 additions and 0 deletions
19
DMRTX.cpp
19
DMRTX.cpp
|
|
@ -185,6 +185,25 @@ uint8_t CDMRTX::writeShortLC(const uint8_t* data, uint8_t length)
|
|||
return 0U;
|
||||
}
|
||||
|
||||
uint8_t CDMRTX::writeAbort(const uint8_t* data, uint8_t length)
|
||||
{
|
||||
if (length != 1U)
|
||||
return 4U;
|
||||
|
||||
switch (data[0U]) {
|
||||
case 1U:
|
||||
m_fifo[0U].reset();
|
||||
return 0U;
|
||||
|
||||
case 2U:
|
||||
m_fifo[1U].reset();
|
||||
return 0U;
|
||||
|
||||
default:
|
||||
return 4U;
|
||||
}
|
||||
}
|
||||
|
||||
void CDMRTX::setStart(bool start)
|
||||
{
|
||||
m_state = start ? DMRTXSTATE_SLOT1 : DMRTXSTATE_IDLE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue