wsn430/include/board_common.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Milan Babel <babel@inf.fu-berlin.de>
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 
24 #ifndef BOARD_COMMON_H
25 #define BOARD_COMMON_H
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
34 #define INFOMEM (0x1000)
35 
40 #define XTIMER_WIDTH (16)
41 #define XTIMER_BACKOFF (40)
42 
48 #define LED0_PIN GPIO_PIN(4, 4)
49 #define LED1_PIN GPIO_PIN(4, 5)
50 #define LED2_PIN GPIO_PIN(4, 6)
51 
52 #define LED_DIR_REG P5DIR
53 #define LED0_MASK (1 << 4)
54 #define LED1_MASK (1 << 5)
55 #define LED2_MASK (1 << 6)
56 
57 #define LED0_ON (LED_DIR_REG &=~LED0_MASK)
58 #define LED0_OFF (LED_DIR_REG |= LED0_MASK)
59 #define LED0_TOGGLE (LED_DIR_REG ^= LED0_MASK)
60 
61 #define LED1_ON (LED_DIR_REG &=~LED1_MASK)
62 #define LED1_OFF (LED_DIR_REG |= LED1_MASK)
63 #define LED1_TOGGLE (LED_DIR_REG ^= LED1_MASK)
64 
65 #define LED2_ON (LED_DIR_REG &=~LED2_MASK)
66 #define LED2_OFF (LED_DIR_REG |= LED2_MASK)
67 #define LED2_TOGGLE (LED_DIR_REG ^= LED2_MASK)
68 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif /* BOARD_COMMON_H */
75