5.11.0.0R3
Software Development Kit
 
Loading...
Searching...
No Matches
platform_mcu_powersave.c File Reference

Functions

platform_result_t platform_gpio_deepsleep_wakeup_enable (const platform_gpio_t *gpio, platform_gpio_irq_trigger_t trigger)
 
void platform_idle_hook (void)
 
platform_result_t platform_mcu_powersave_disable (void)
 
platform_result_t platform_mcu_powersave_enable (void)
 
uint32_t platform_power_down_hook (uint32_t ticks)
 
int platform_power_down_permission (void)
 

Detailed Description

MCU powersave implementation

Function Documentation

◆ platform_gpio_deepsleep_wakeup_enable()

platform_result_t platform_gpio_deepsleep_wakeup_enable ( const platform_gpio_t * gpio,
platform_gpio_irq_trigger_t trigger )

Configure GPIO to wakeup MCU from deep-sleep.

Parameters
[in]gpio: GPIO Pin to wake up from Deep Sleep
[in]trigger: Wakeup trigger
Returns
WICED_SUCCESS : on success.
WICED_ERROR : on failure

◆ platform_idle_hook()

void platform_idle_hook ( void )

Hook for RTOS for entering idle mode

◆ platform_mcu_powersave_disable()

platform_result_t platform_mcu_powersave_disable ( void )

Disable MCU powersave

Returns
platform_result_t

◆ platform_mcu_powersave_enable()

platform_result_t platform_mcu_powersave_enable ( void )

Enable MCU powersave

Returns
platform_result_t

◆ platform_power_down_hook()

uint32_t platform_power_down_hook ( uint32_t sleep_ms)

Hook for RTOS for entering deep sleep mode

Parameters
[in]sleep_ms: period in millisecond the MCU needs to sleep
Returns
period in millisecond the MCU has slept

◆ platform_power_down_permission()

int platform_power_down_permission ( void )

Hook for RTOS to ask MCU whether it want to enter power-down mode

Returns
non-zero if MCU want RTOS enter power down mode