atmega_common/include/cpu.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Kaspar Schleiser <kaspar@schleiser.de>
3  * 2014 Freie Universit├Ąt Berlin, Hinnerk van Bruinehsen
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
27 #ifndef CPU_H
28 #define CPU_H
29 
30 #include <stdio.h>
31 #include <stdint.h>
32 
33 #include <avr/interrupt.h>
34 #include "cpu_conf.h"
35 
40 #include "irq.h"
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
49 extern volatile uint8_t __in_isr;
50 
54 static inline void __enter_isr(void)
55 {
56  __in_isr = 1;
57 }
58 
62 static inline void __exit_isr(void)
63 {
64  __in_isr = 0;
65 }
66 
70 void cpu_init(void);
71 
77 static inline void cpu_print_last_instruction(void)
78 {
79  puts("n/a");
80 }
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif /* CPU_H */
87 
volatile uint8_t __in_isr
For downwards compatibility with old RIOT code.
static void __exit_isr(void)
Flag exiting of an ISR.
void cpu_init(void)
Initialization of the CPU.
static void __enter_isr(void)
Flag entering of an ISR.
stdio.h wrapper for MSP430
static void cpu_print_last_instruction(void)
Print the last instruction&#39;s address.
IRQ driver interface.