module documentation

Stick firmware power saving helper

Function boost_allowing_state Change clock boosting state
Function boost_clock Boosts clock depending on battery and allow_boosts state
Function loop Slow down MCU clock to save power, make sure to call it every 1-2s so it is not always highest one possible
Function set_freq Set MCU frequency in Hz
Variable allow_boosts Undocumented
Variable cooldown Undocumented
Variable last_clock_change Undocumented
def boost_allowing_state(allow: bool) -> bool:

Change clock boosting state Args: allow (bool): True if you want to allow clock boosting, False if no Returns: bool: Current state of allow_boosts

def boost_clock():

Boosts clock depending on battery and allow_boosts state

def loop():

Slow down MCU clock to save power, make sure to call it every 1-2s so it is not always highest one possible

def set_freq(freq: int):

Set MCU frequency in Hz Args: freq (int): MCU frequency in Hz Returns: bool: True if success, False if failed/cooldown

allow_boosts: bool =

Undocumented

cooldown: int =

Undocumented

last_clock_change =

Undocumented