mirror of
https://github.com/espressif/openthread.git
synced 2026-09-08 18:20:06 +00:00
[radio] add API for resetting CSL parameters (#9772)
Add `ResetCsl` and `otPlatRadioResetCsl` This allows handling stack reset as separate call instead of using `kShortAddrInvalid` as `otShortAddress` and `nullptr` as `otExtAddress` which can be difficult to handle on vendor's side. Default implementation still calls `otPlatRadioEnableCsl(aInstance,0, Mac::kShortAddrInvalid, nullptr)` So no action is needed if vendor has already implemented handling this case. Signed-off-by: Maciej Baczmanski <[email protected]>
This commit is contained in:
@@ -1331,11 +1331,18 @@ otError otPlatRadioEnableCsl(otInstance *aInstance,
|
||||
OT_UNUSED_VARIABLE(aShortAddr);
|
||||
OT_UNUSED_VARIABLE(aExtAddr);
|
||||
|
||||
otError error = OT_ERROR_NONE;
|
||||
|
||||
sCslPeriod = aCslPeriod;
|
||||
|
||||
return error;
|
||||
return OT_ERROR_NONE;
|
||||
}
|
||||
|
||||
otError otPlatRadioResetCsl(otInstance *aInstance)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
sCslPeriod = 0;
|
||||
|
||||
return OT_ERROR_NONE;
|
||||
}
|
||||
|
||||
void otPlatRadioUpdateCslSampleTime(otInstance *aInstance, uint32_t aCslSampleTime)
|
||||
|
||||
Reference in New Issue
Block a user