telosb/include/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 
28 #ifndef BOARD_H
29 #define BOARD_H
30 
31 #include "cpu.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
40 #ifndef __MSP430F1611__
41 #define __MSP430F1611__
42 #endif
43 
48 #ifndef UART_STDIO_BAUDRATE
49 #define UART_STDIO_BAUDRATE (9600)
50 #endif
51 
57 #define XTIMER_WIDTH (16)
58 #define XTIMER_BACKOFF (40)
59 
66 #define MSP430_INITIAL_CPU_SPEED 2457600uL
67 #define F_CPU MSP430_INITIAL_CPU_SPEED
68 #define F_RC_OSCILLATOR 32768
69 #define MSP430_HAS_DCOR 0
70 #define MSP430_HAS_EXTERNAL_CRYSTAL 1
71 
77 #define LED0_PIN GPIO_PIN(4, 0)
78 #define LED1_PIN GPIO_PIN(4, 1)
79 #define LED2_PIN GPIO_PIN(4, 2)
80 
81 #define LED_OUT_REG P5OUT
82 #define LED0_MASK (0x10)
83 #define LED1_MASK (0x20)
84 #define LED2_MASK (0x40)
85 
86 #define LED0_ON (LED_OUT_REG &=~LED0_MASK)
87 #define LED0_OFF (LED_OUT_REG |= LED0_MASK)
88 #define LED0_TOGGLE (LED_OUT_REG ^= LED0_MASK)
89 
90 #define LED1_ON (LED_OUT_REG &=~LED1_MASK)
91 #define LED1_OFF (LED_OUT_REG |= LED1_MASK)
92 #define LED1_TOGGLE (LED_OUT_REG ^= LED1_MASK)
93 
94 #define LED2_ON (LED_OUT_REG &=~LED2_MASK)
95 #define LED2_OFF (LED_OUT_REG |= LED2_MASK)
96 #define LED2_TOGGLE (LED_OUT_REG ^= LED2_MASK)
97 
102 #define CC2420_PARAMS_BOARD {.spi = SPI_DEV(0), \
103  .spi_clk = SPI_CLK_1MHZ , \
104  .pin_cs = GPIO_PIN(P4, 2), \
105  .pin_fifo = GPIO_PIN(P1, 3), \
106  .pin_fifop = GPIO_PIN(P1, 0), \
107  .pin_cca = GPIO_PIN(P1, 4), \
108  .pin_sfd = GPIO_PIN(P4, 1), \
109  .pin_vrefen = GPIO_PIN(P4, 5), \
110  .pin_reset = GPIO_PIN(P4, 6)}
111 
112 #ifdef __cplusplus
113 }
114 #endif
115 
117 #endif /* BOARD_H */