Add the DMR Abort command.

This commit is contained in:
Jonathan Naylor 2016-06-17 07:47:11 +01:00
parent 195f94c368
commit 4dbcfd6b04
3 changed files with 31 additions and 0 deletions

View file

@ -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;