2017-01-09 17:10:58 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de>
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup drivers_periph_pm Power Management
|
|
|
|
* @ingroup drivers_periph
|
|
|
|
* @brief The kernels power management interface
|
|
|
|
*
|
2017-06-06 13:45:59 +02:00
|
|
|
* @attention This interface *must* be implemented for every platform in RIOT.
|
|
|
|
*
|
|
|
|
* @{
|
2017-01-09 17:10:58 +01:00
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Power management interface
|
|
|
|
*
|
|
|
|
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
|
|
|
*/
|
|
|
|
|
2017-05-23 18:19:52 +02:00
|
|
|
#ifndef PERIPH_PM_H
|
|
|
|
#define PERIPH_PM_H
|
2017-01-09 17:10:58 +01:00
|
|
|
|
|
|
|
#include "periph_cpu.h"
|
|
|
|
|
2017-10-12 16:20:15 +02:00
|
|
|
#ifdef MODULE_PM_LAYERED
|
|
|
|
#include "pm_layered.h"
|
|
|
|
#endif
|
|
|
|
|
2017-01-09 17:10:58 +01:00
|
|
|
#ifdef __cplusplus
|
2017-10-12 16:20:15 +02:00
|
|
|
extern "C" {
|
2017-01-09 17:10:58 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Reboot MCU
|
|
|
|
*/
|
|
|
|
void pm_reboot(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Turn off MCU completely
|
|
|
|
*/
|
|
|
|
void pm_off(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Switches the MCU to the lowest possible power mode
|
|
|
|
*
|
|
|
|
* This function will be called by the idle thread.
|
|
|
|
*/
|
|
|
|
void pm_set_lowest(void);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-05-23 18:19:52 +02:00
|
|
|
#endif /* PERIPH_PM_H */
|
2017-01-09 17:10:58 +01:00
|
|
|
/** @} */
|