atmega328p/include/periph_cpu.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 HAW Hamburg
3  * 2016 Freie Universit├Ąt Berlin
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 
21 #ifndef PERIPH_CPU_H
22 #define PERIPH_CPU_H
23 
24 #include "periph_cpu_common.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
33 #define GPIO_PIN(x, y) ((x << 4) | y)
34 
38 enum {
39  PORT_B = 1,
40  PORT_C = 2,
41  PORT_D = 3
42 };
43 
49 #define CPU_ATMEGA_EXT_INTS { GPIO_PIN(PORT_D, 2), \
50  GPIO_PIN(PORT_D, 3) }
51 
56 #define I2C_PORT_REG PORTC
57 #define I2C_PIN_MASK (1 << PORTC4) | (1 << PORTC5)
58 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif /* PERIPH_CPU_H */
65