wsn430-common/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_DEV (0)
41 #define XTIMER_CHAN (0)
42 #define XTIMER_WIDTH (16)
43 #define XTIMER_BACKOFF (40)
44 
50 #define LED0_PIN GPIO_PIN(4, 4)
51 #define LED1_PIN GPIO_PIN(4, 5)
52 #define LED2_PIN GPIO_PIN(4, 6)
53 
54 #define LED_DIR_REG P5DIR
55 #define LED0_MASK (1 << 4)
56 #define LED1_MASK (1 << 5)
57 #define LED2_MASK (1 << 6)
58 
59 #define LED0_ON (LED_DIR_REG &=~LED0_MASK)
60 #define LED0_OFF (LED_DIR_REG |= LED0_MASK)
61 #define LED0_TOGGLE (LED_DIR_REG ^= LED0_MASK)
62 
63 #define LED1_ON (LED_DIR_REG &=~LED1_MASK)
64 #define LED1_OFF (LED_DIR_REG |= LED1_MASK)
65 #define LED1_TOGGLE (LED_DIR_REG ^= LED1_MASK)
66 
67 #define LED2_ON (LED_DIR_REG &=~LED2_MASK)
68 #define LED2_OFF (LED_DIR_REG |= LED2_MASK)
69 #define LED2_TOGGLE (LED_DIR_REG ^= LED2_MASK)
70 
72 #ifdef __cplusplus
73 }
74 #endif
75 
76 #endif /* BOARD_COMMON_H */
77