2014-09-24 00:49:17 +02:00
|
|
|
/*
|
2017-01-09 18:09:07 +01:00
|
|
|
* Copyright (C) 2017 Kaspar Schleiser <kaspar@schleiser.de>
|
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
|
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>
|
2014-09-24 00:49:17 +02:00
|
|
|
*
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "cpu.h"
|
2017-01-09 18:09:07 +01:00
|
|
|
#include "periph/pm.h"
|
2014-09-24 00:49:17 +02:00
|
|
|
|
2017-01-09 18:09:07 +01:00
|
|
|
#ifndef FEATURES_PERIPH_PM
|
|
|
|
void pm_set_lowest(void)
|
|
|
|
{
|
|
|
|
/* Executes a device DSB (Data Synchronization Barrier) */
|
|
|
|
__DSB();
|
|
|
|
/* Enter standby mode */
|
|
|
|
__WFI();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void pm_reboot(void)
|
2014-09-24 00:49:17 +02:00
|
|
|
{
|
|
|
|
NVIC_SystemReset();
|
|
|
|
}
|