mirror of
https://github.com/espressif/openthread.git
synced 2026-09-14 21:20:11 +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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
otRadioCaps otPlatRadioGetCaps()
|
||||||
|
{
|
||||||
|
return kRadioCapsNone;
|
||||||
|
}
|
||||||
|
|
||||||
ThreadError otPlatRadioHandleTransmitDone(bool *rxPending)
|
ThreadError otPlatRadioHandleTransmitDone(bool *rxPending)
|
||||||
{
|
{
|
||||||
ThreadError error = kThreadError_None;
|
ThreadError error = kThreadError_None;
|
||||||
|
|||||||
@@ -77,6 +77,17 @@ enum
|
|||||||
kPhyUsPerSymbol = ((kPhyBitsPerOctet / kPhySymbolsPerOctet) * 1000000) / kPhyBitRate,
|
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.
|
* This structure represents an IEEE 802.15.4 radio frame.
|
||||||
*/
|
*/
|
||||||
@@ -272,6 +283,13 @@ ThreadError otPlatRadioHandleTransmitDone(bool *aFramePending);
|
|||||||
*/
|
*/
|
||||||
int8_t otPlatRadioGetNoiseFloor(void);
|
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));
|
SuccessOrExit(error = otPlatRadioTransmit(&mSendFrame));
|
||||||
|
|
||||||
if (mSendFrame.GetAckRequest())
|
if (mSendFrame.GetAckRequest() && !(otPlatRadioGetCaps() & kRadioCapsAckTimeout))
|
||||||
{
|
{
|
||||||
mAckTimer.Start(kAckTimeout);
|
mAckTimer.Start(kAckTimeout);
|
||||||
otLogDebgMac("ack timer start\n");
|
otLogDebgMac("ack timer start\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user