pm_layered.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Kaspar Schleiser <kaspar@schleiser.de>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
34 #ifndef PM_LAYERED_H
35 #define PM_LAYERED_H
36 
37 #include "assert.h"
38 #include "periph_cpu.h"
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 #ifndef PROVIDES_PM_OFF
45 #define PROVIDES_PM_OFF
46 #endif
47 
48 #ifndef PROVIDES_PM_SET_LOWEST
49 #define PROVIDES_PM_SET_LOWEST
50 #endif
51 
57 void pm_block(unsigned mode);
58 
64 void pm_unblock(unsigned mode);
65 
76 void pm_set(unsigned mode);
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif /* PM_LAYERED_H */
83 
void pm_unblock(unsigned mode)
Unblock a power mode.
POSIX.1-2008 compliant version of the assert macro.
void pm_block(unsigned mode)
Block a power mode.
void pm_set(unsigned mode)
Switches the MCU to a new power mode.