Skip to content
Snippets Groups Projects
Commit 679bf054 authored by schneider's avatar schneider
Browse files

feat(epicardium): Add a simple sleep() API call

This can be used by the second core to signal that the system can go to
a light sleep to recuce power consumption.
parent 77bd73ba
No related branches found
No related tags found
1 merge request!480Pycardium: Use sleep API call while sleeping
......@@ -207,3 +207,8 @@ void sleep_deepsleep(void)
SystemCoreClockUpdate();
MAX77650_setEN_SBB2(0b110);
}
void epic_sleep(uint32_t ms)
{
vTaskDelay(ms);
}
......@@ -33,6 +33,7 @@ typedef _Bool bool;
#define API_SYSTEM_EXEC 0x2
#define API_SYSTEM_RESET 0x3
#define API_BATTERY_VOLTAGE 0x4
#define API_SLEEP 0x5
#define API_INTERRUPT_ENABLE 0xA
#define API_INTERRUPT_DISABLE 0xB
......@@ -335,6 +336,8 @@ API(API_SYSTEM_EXEC, int __epic_exec(char *name));
*/
API(API_SYSTEM_RESET, void epic_system_reset(void));
API(API_SLEEP, void epic_sleep(uint32_t ms));
/**
* PMIC API
* ===============
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment