2014-09-24 00:49:17 +02:00
|
|
|
/*
|
2017-10-19 22:52:18 +02:00
|
|
|
* Copyright (C) 2017 Kaspar Schleiser <kaspar@schleiser.de>
|
2017-01-13 11:50:05 +01:00
|
|
|
* 2017 Freie Universität Berlin
|
2014-09-24 00:49:17 +02:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2015-05-18 18:47:17 +02:00
|
|
|
* @ingroup cpu_cortexm_common
|
2017-06-22 15:43:17 +02:00
|
|
|
* @ingroup drivers_periph_pm
|
2014-09-24 00:49:17 +02:00
|
|
|
* @{
|
|
|
|
*
|
2014-11-20 13:34:00 +01:00
|
|
|
* @file
|
2017-01-09 18:09:07 +01:00
|
|
|
* @brief common periph/pm functions
|
2014-09-24 00:49:17 +02:00
|
|
|
*
|
2015-07-30 10:32:08 +02:00
|
|
|
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
2017-01-13 11:50:05 +01:00
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
2014-09-24 00:49:17 +02:00
|
|
|
*
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "cpu.h"
|
2017-01-09 18:09:07 +01:00
|
|
|
#include "periph/pm.h"
|
2014-09-24 00:49:17 +02:00
|
|
|
|
2017-10-12 16:20:15 +02:00
|
|
|
#if !defined(MODULE_PM_LAYERED) && !defined(PROVIDES_PM_SET_LOWEST_CORTEXM)
|
2017-01-09 18:09:07 +01:00
|
|
|
void pm_set_lowest(void)
|
|
|
|
{
|
2017-01-13 11:50:05 +01:00
|
|
|
cortexm_sleep(0);
|
2017-01-09 18:09:07 +01:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void pm_reboot(void)
|
2014-09-24 00:49:17 +02:00
|
|
|
{
|
|
|
|
NVIC_SystemReset();
|
|
|
|
}
|