Function system_sleep()

Put the system to sleep waiting for interrupt.

void system_sleep( void )

Executes a device DSB (Data Synchronization Barrier) instruction to ensure all ongoing memory accesses have completed. Further, a WFI (Wait For Interrupt) instruction is executed to place the device into the sleep mode specified by system_set_sleepmode.