Files
libretiny/cores/common/base/api/lt_sleep.c
devgs e1c5761df9 [beken-72xx] Allow setting deep sleep wake-up pins as floating (#275)
According to guide `gpio_stay_*_map` are specifically there to prevent
pulling pins to a specific level and let them float during deep sleep.

https://docs.bekencorp.com/sdk_3.0.x/bk7238/build/en/latest/developer-guide/power_save/sleep_test.html

This allows any external low-power circuitry to change a pin level, as
required, to trigger the wake up

This requires changes in BDK and was implemented via fixup. Also, exposed
`gpio_stay_lo_map` parameter via `lt_deep_sleep_keep_floating_gpio` to
manage this configuration for pins in range P0-P31.
2024-09-05 14:45:48 +02:00

14 lines
475 B
C

/* Copyright (c) Peter Sarkozi 2023-06-17. */
#include "lt_sleep.h"
__attribute__((weak)) void lt_deep_sleep_config_gpio(uint32_t gpio_index_map, bool on_high);
__attribute__((weak)) void lt_deep_sleep_unset_gpio(uint32_t gpio_index_map);
__attribute__((weak)) void lt_deep_sleep_keep_floating_gpio(uint32_t gpio_index_map, bool on_high);
__attribute__((weak)) void lt_deep_sleep_config_timer(uint32_t sleep_duration);
__attribute__((weak)) void lt_deep_sleep_enter();