diff --git a/cpu/cc26xx/lpm.c b/cpu/cc26xx/lpm.c index 28a7d7582..6526a8eeb 100644 --- a/cpu/cc26xx/lpm.c +++ b/cpu/cc26xx/lpm.c @@ -390,6 +390,12 @@ lpm_register_module(lpm_registered_module_t *module) } /*---------------------------------------------------------------------------*/ void +lpm_unregister_module(lpm_registered_module_t *module) +{ + list_remove(modules_list, module); +} +/*---------------------------------------------------------------------------*/ +void lpm_init() { list_init(modules_list); diff --git a/cpu/cc26xx/lpm.h b/cpu/cc26xx/lpm.h index 7a4dae7a8..eaecebb16 100644 --- a/cpu/cc26xx/lpm.h +++ b/cpu/cc26xx/lpm.h @@ -153,6 +153,15 @@ void lpm_shutdown(uint32_t wakeup_pin, uint32_t io_pull, uint32_t wake_on); */ void lpm_register_module(lpm_registered_module_t *module); +/** + * \brief Unregister a module from LPM notifications. + * \param module A pointer to the data structure with the module definition + * + * When a previously registered module is no longer interested in LPM + * notifications, this function can be used to unregister it. + */ +void lpm_unregister_module(lpm_registered_module_t *module); + /** * \brief Initialise the low-power mode management module */