Add function to unregister a module from LPM
This commit is contained in:
parent
0e92b508b3
commit
b3ac3ac0c1
|
@ -390,6 +390,12 @@ lpm_register_module(lpm_registered_module_t *module)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
|
lpm_unregister_module(lpm_registered_module_t *module)
|
||||||
|
{
|
||||||
|
list_remove(modules_list, module);
|
||||||
|
}
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
void
|
||||||
lpm_init()
|
lpm_init()
|
||||||
{
|
{
|
||||||
list_init(modules_list);
|
list_init(modules_list);
|
||||||
|
|
|
@ -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);
|
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
|
* \brief Initialise the low-power mode management module
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue