Skip to content

Commit a0f291b

Browse files
dinabenamarMartin-NXP
authored andcommitted
[NXP][platform][rw61x] Expose API to get or set reset in idle and add call to otPlatSetResetFunction to set reset function in OT to application function
1 parent 976f37d commit a0f291b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/platform/nxp/rt/rw61x/PlatformManagerImpl.cpp

+19
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
#endif
5151

5252
extern "C" void BOARD_InitHardware(void);
53+
extern "C" void otPlatSetResetFunction(void (*fp)(void));
54+
extern "C" void initiateResetInIdle(void);
5355

5456
#if CHIP_DEVICE_CONFIG_ENABLE_WPA
5557

@@ -205,6 +207,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void)
205207
*/
206208
otPlatLogInit();
207209
otPlatRadioInit();
210+
otPlatSetResetFunction(initiateResetInIdle);
208211
#endif
209212

210213
#if CHIP_DEVICE_CONFIG_ENABLE_WPA
@@ -307,6 +310,22 @@ bool PlatformManagerImpl::GetResetInIdleValue(void)
307310
return resetInIdle;
308311
}
309312

313+
extern "C" void initiateResetInIdle(void)
314+
{
315+
PlatformMgr().Shutdown();
316+
PlatformMgrImpl().ScheduleResetInIdle();
317+
}
318+
319+
extern "C" void scheduleResetInIdle(void)
320+
{
321+
PlatformMgrImpl().ScheduleResetInIdle();
322+
}
323+
324+
extern "C" bool getResetInIdleValue(void)
325+
{
326+
return PlatformMgrImpl().GetResetInIdleValue();
327+
}
328+
310329
void PlatformManagerImpl::StopBLEConnectivity(void) {}
311330

312331
void PlatformManagerImpl::_Shutdown()

0 commit comments

Comments
 (0)