mirror of https://github.com/ARMmbed/mbed-os.git
S5JS100: remove idle hook which is essentially the non-Tickless hook from Mbed OS
parent
33a7e66a07
commit
65e5db8631
|
@ -29,7 +29,6 @@
|
||||||
|
|
||||||
int nbsleep_req = 0;
|
int nbsleep_req = 0;
|
||||||
int external_pin = 0;
|
int external_pin = 0;
|
||||||
static int initialize_policy = 0;
|
|
||||||
static int disable_poweroffbycp = 1;
|
static int disable_poweroffbycp = 1;
|
||||||
|
|
||||||
static inline void hw_delay_us(unsigned int value)
|
static inline void hw_delay_us(unsigned int value)
|
||||||
|
@ -68,19 +67,6 @@ int s5js100_idle_sicd(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void s5js100_idle_hook(void)
|
|
||||||
{
|
|
||||||
core_util_critical_section_enter();
|
|
||||||
sleep();
|
|
||||||
core_util_critical_section_exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void set_sleep_policy(void)
|
|
||||||
{
|
|
||||||
rtos_attach_idle_hook(&s5js100_idle_hook);
|
|
||||||
initialize_policy = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void config_poweroffbycp(int enable)
|
void config_poweroffbycp(int enable)
|
||||||
{
|
{
|
||||||
disable_poweroffbycp = (enable == 0) ? 1 : 0;
|
disable_poweroffbycp = (enable == 0) ? 1 : 0;
|
||||||
|
@ -119,10 +105,6 @@ static int change_cp_pwr_lock(int lock)
|
||||||
|
|
||||||
void hal_sleep(void)
|
void hal_sleep(void)
|
||||||
{
|
{
|
||||||
if (initialize_policy == 0) {
|
|
||||||
set_sleep_policy();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!strcmp(get_env("SLEEP"), "ON") && disable_poweroffbycp != 1) {
|
if (!strcmp(get_env("SLEEP"), "ON") && disable_poweroffbycp != 1) {
|
||||||
hal_deepsleep();
|
hal_deepsleep();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue