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
49 
55 #define XTIMER_WIDTH (16)
56 #define XTIMER_BACKOFF (40)
57 
64 #define MSP430_INITIAL_CPU_SPEED 2457600uL
65 #define F_CPU MSP430_INITIAL_CPU_SPEED
66 #define F_RC_OSCILLATOR 32768
67 #define MSP430_HAS_DCOR 0
68 #define MSP430_HAS_EXTERNAL_CRYSTAL 1
69 
75 #define LED0_PIN GPIO_PIN(4, 0)
76 #define LED1_PIN GPIO_PIN(4, 1)
77 #define LED2_PIN GPIO_PIN(4, 2)
78 
79 #define LED_OUT_REG P5OUT
80 #define LED0_MASK (0x10)
81 #define LED1_MASK (0x20)
82 #define LED2_MASK (0x40)
83 
84 #define LED0_ON (LED_OUT_REG &=~LED0_MASK)
85 #define LED0_OFF (LED_OUT_REG |= LED0_MASK)
86 #define LED0_TOGGLE (LED_OUT_REG ^= LED0_MASK)
87 
88 #define LED1_ON (LED_OUT_REG &=~LED1_MASK)
89 #define LED1_OFF (LED_OUT_REG |= LED1_MASK)
90 #define LED1_TOGGLE (LED_OUT_REG ^= LED1_MASK)
91 
92 #define LED2_ON (LED_OUT_REG &=~LED2_MASK)
93 #define LED2_OFF (LED_OUT_REG |= LED2_MASK)
94 #define LED2_TOGGLE (LED_OUT_REG ^= LED2_MASK)
95 
101 #define CC2420_PARAM_SPI_CLK (SPI_CLK_1MHZ)
102 #define CC2420_PARAM_CS GPIO_PIN(P4, 2)
103 #define CC2420_PARAM_FIFO GPIO_PIN(P1, 3)
104 #define CC2420_PARAM_FIFOP GPIO_PIN(P1, 0)
105 #define CC2420_PARAM_CCA GPIO_PIN(P1, 4)
106 #define CC2420_PARAM_SFD GPIO_PIN(P4, 1)
107 #define CC2420_PARAM_VREFEN GPIO_PIN(P4, 5)
108 #define CC2420_PARAM_RESET GPIO_PIN(P4, 6)
109 
111 #ifdef __cplusplus
112 }
113 #endif
114 
116 #endif /* BOARD_H */