on macMcuInit function we do MAC_RADIO_TURN_ON_AUTO_ACK();
on rxStartIsr function, what do they do bellow?
MAC_RADIO_TX_ACK_PEND();
MAC_RADIO_TX_ACK();
MAC_RADIO_REQUEST_ACK_TX_DONE_CALLBACK();
if we need to process ack issue on RF isr, would that we miss process ack happen if we have other isr?
MAC_INTERNAL_API void macMcuInit(void)
{
……
/* Turn on autoack */
MAC_RADIO_TURN_ON_AUTO_ACK();
……
}
static void rxStartIsr(void)
……
/*-------------------------------------------------------------------------------
* Process any ACK request.
*/
if (macRxOutgoingAckFlag)
{
halIntState_t s;
/*
* This critical section ensures that the callback ISR is initiated within time
* to guarantee correlation with the strobe.
*/
HAL_ENTER_CRITICAL_SECTION(s);
/* Do not ack data packet with pending more data */
if( MAC_FRAME_TYPE(&rxBuf[1]) == MAC_FRAME_TYPE_COMMAND )
{
……
}
if( ackWithPending == MAC_RX_FLAG_ACK_PENDING )
{
MAC_RADIO_TX_ACK_PEND();
}
else
{
MAC_RADIO_TX_ACK();
}
/* request a callback to macRxAckTxDoneCallback() when the ACK transmit has finished */
MAC_RADIO_REQUEST_ACK_TX_DONE_CALLBACK();
HAL_EXIT_CRITICAL_SECTION(s);
}
}