board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013, 2014 INRIA
3  * 2015 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 
26 #ifndef BOARD_H
27 #define BOARD_H
28 
29 #include "cpu.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
38 #ifndef __MSP430F1611__
39 #define __MSP430F1611__
40 #endif
41 
46 #ifndef STDIO_UART_BAUDRATE
47 #define STDIO_UART_BAUDRATE (9600)
48 #endif
55 #define XTIMER_WIDTH (16)
56 #define XTIMER_BACKOFF (40)
63 #define LED0_PIN GPIO_PIN(4, 0)
64 #define LED1_PIN GPIO_PIN(4, 1)
65 #define LED2_PIN GPIO_PIN(4, 2)
66 
67 #define LED_OUT_REG P5OUT
68 #define LED0_MASK (0x10)
69 #define LED1_MASK (0x20)
70 #define LED2_MASK (0x40)
71 
72 #define LED0_ON (LED_OUT_REG &=~LED0_MASK)
73 #define LED0_OFF (LED_OUT_REG |= LED0_MASK)
74 #define LED0_TOGGLE (LED_OUT_REG ^= LED0_MASK)
75 
76 #define LED1_ON (LED_OUT_REG &=~LED1_MASK)
77 #define LED1_OFF (LED_OUT_REG |= LED1_MASK)
78 #define LED1_TOGGLE (LED_OUT_REG ^= LED1_MASK)
79 
80 #define LED2_ON (LED_OUT_REG &=~LED2_MASK)
81 #define LED2_OFF (LED_OUT_REG |= LED2_MASK)
82 #define LED2_TOGGLE (LED_OUT_REG ^= LED2_MASK)
89 #define CC2420_PARAM_SPI_CLK (SPI_CLK_1MHZ)
90 #define CC2420_PARAM_CS GPIO_PIN(P4, 2)
91 #define CC2420_PARAM_FIFO GPIO_PIN(P1, 3)
92 #define CC2420_PARAM_FIFOP GPIO_PIN(P1, 0)
93 #define CC2420_PARAM_CCA GPIO_PIN(P1, 4)
94 #define CC2420_PARAM_SFD GPIO_PIN(P4, 1)
95 #define CC2420_PARAM_VREFEN GPIO_PIN(P4, 5)
96 #define CC2420_PARAM_RESET GPIO_PIN(P4, 6)
99 #ifdef __cplusplus
100 }
101 #endif
102 
104 #endif /* BOARD_H */