Skip to content

File lt_sleep.h

FileList > api > lt_sleep.h

Go to the source code of this file.

  • #include <libretiny.h>

Public Functions

Type Name
void lt_deep_sleep_config_gpio (uint32_t gpio_index_map, bool on_high)
Enable GPIO Wakeup from Deep Sleep.
void lt_deep_sleep_config_timer (uint32_t sleep_duration)
Set a sleep timer to wake up the device.
void lt_deep_sleep_enter ()
Start deep sleep.
void lt_deep_sleep_unset_gpio (uint32_t gpio_index_map)
Disable GPIO Wakeup on given pins.

Public Functions Documentation

function lt_deep_sleep_config_gpio

Enable GPIO Wakeup from Deep Sleep.

void lt_deep_sleep_config_gpio (
    uint32_t gpio_index_map,
    bool on_high
) 

Parameters:

  • gpio_index_map bitMap of the pins we should wake up on
  • on_high whether to wake up on High or Low state

function lt_deep_sleep_config_timer

Set a sleep timer to wake up the device.

void lt_deep_sleep_config_timer (
    uint32_t sleep_duration
) 

Parameters:

  • sleep_duration the time in milliseconds to sleep

function lt_deep_sleep_enter

void lt_deep_sleep_enter () 

function lt_deep_sleep_unset_gpio

Disable GPIO Wakeup on given pins.

void lt_deep_sleep_unset_gpio (
    uint32_t gpio_index_map
) 

Parameters:

  • gpio_index_map bitMap of the pins we should disable wake up on

The documentation for this class was generated from the following file cores/common/base/api/lt_sleep.h