nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches

◆ pm_handler_flash_clean()

void pm_handler_flash_clean ( const struct pm_evt * pm_evt)

#include <peer_manager_handler.h>

Auxiliary standard function for maintaining room in non-volatile storage based on Peer Manager events.

This function does the following:

  • Ranks peers by when they last connected.
  • Garbage collects the non-volatile storage when needed.
  • Deletes the lowest ranked peer(s) when garbage collection is insufficient.
Note
See also pm_handler_flash_clean_on_return.
In normal circumstances, this function should be called for every Peer Manager event.
This function is a supplement to pm_handler_on_pm_evt, not its replacement.
Parameters
[in]pm_evtPeer Manager event to handle.