forked from espressif/esp-idf
fix(openthread): set channel for energy scan
This commit is contained in:
@ -9,6 +9,8 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#define US_PER_SYMBLE 16
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -412,7 +412,8 @@ void otPlatRadioClearSrcMatchExtEntries(otInstance *aInstance)
|
|||||||
|
|
||||||
otError otPlatRadioEnergyScan(otInstance *aInstance, uint8_t aScanChannel, uint16_t aScanDuration)
|
otError otPlatRadioEnergyScan(otInstance *aInstance, uint8_t aScanChannel, uint16_t aScanDuration)
|
||||||
{
|
{
|
||||||
esp_ieee802154_energy_detect(aScanDuration);
|
esp_ieee802154_set_channel(aScanChannel);
|
||||||
|
esp_ieee802154_energy_detect(aScanDuration * US_PER_MS / US_PER_SYMBLE);
|
||||||
|
|
||||||
return OT_ERROR_NONE;
|
return OT_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user