mirror of
https://github.com/espressif/openthread.git
synced 2026-07-16 09:04:10 +00:00
add otPlatRadioGetCaps method to check radio capabilities (#53)
add doxygen for otRadioCaps remove tmp file
This commit is contained in:
@@ -260,6 +260,11 @@ int8_t otPlatRadioGetNoiseFloor()
|
||||
return 0;
|
||||
}
|
||||
|
||||
otRadioCaps otPlatRadioGetCaps()
|
||||
{
|
||||
return kRadioCapsNone;
|
||||
}
|
||||
|
||||
ThreadError otPlatRadioHandleTransmitDone(bool *rxPending)
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
|
||||
@@ -77,6 +77,17 @@ enum
|
||||
kPhyUsPerSymbol = ((kPhyBitsPerOctet / kPhySymbolsPerOctet) * 1000000) / kPhyBitRate,
|
||||
};
|
||||
|
||||
/**
|
||||
* This enum represents radio capabilities.
|
||||
*
|
||||
*/
|
||||
|
||||
typedef enum otRadioCaps
|
||||
{
|
||||
kRadioCapsNone = 0, ///< None
|
||||
kRadioCapsAckTimeout = 1, ///< Radio supports AckTime event
|
||||
} otRadioCaps;
|
||||
|
||||
/**
|
||||
* This structure represents an IEEE 802.15.4 radio frame.
|
||||
*/
|
||||
@@ -272,6 +283,13 @@ ThreadError otPlatRadioHandleTransmitDone(bool *aFramePending);
|
||||
*/
|
||||
int8_t otPlatRadioGetNoiseFloor(void);
|
||||
|
||||
/**
|
||||
* Get the radio capabilities.
|
||||
*
|
||||
* @returns The radio capability bit vector. The stack enables or disables some functions based on this value.
|
||||
*/
|
||||
otRadioCaps otPlatRadioGetCaps(void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
|
||||
@@ -516,7 +516,7 @@ void Mac::HandleBeginTransmit(void)
|
||||
|
||||
SuccessOrExit(error = otPlatRadioTransmit(&mSendFrame));
|
||||
|
||||
if (mSendFrame.GetAckRequest())
|
||||
if (mSendFrame.GetAckRequest() && !(otPlatRadioGetCaps() & kRadioCapsAckTimeout))
|
||||
{
|
||||
mAckTimer.Start(kAckTimeout);
|
||||
otLogDebgMac("ack timer start\n");
|
||||
|
||||
Reference in New Issue
Block a user