[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:
Maciej Baczmański
2024-01-22 16:37:22 -08:00
committed by GitHub
parent fab2c9ac2d
commit 84e0e77ce2
7 changed files with 54 additions and 9 deletions
+10 -3
View File
@@ -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)