The friendly Operating System for the Internet of Things
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 TELOSB_BOARD_H
29 #define TELOSB_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_DEV (0)
58 #define XTIMER_CHAN (0)
59 #define XTIMER_WIDTH (16)
60 #define XTIMER_BACKOFF (40)
61 
69 #define MSP430_INITIAL_CPU_SPEED 2457600uL
70 #define F_CPU MSP430_INITIAL_CPU_SPEED
71 #define F_RC_OSCILLATOR 32768
72 #define MSP430_HAS_DCOR 0
73 #define MSP430_HAS_EXTERNAL_CRYSTAL 1
74 
80 #define LED0_PIN GPIO_PIN(4, 0)
81 #define LED1_PIN GPIO_PIN(4, 1)
82 #define LED2_PIN GPIO_PIN(4, 2)
83 
84 #define LED_OUT_REG P5OUT
85 #define LED0_MASK (0x10)
86 #define LED1_MASK (0x20)
87 #define LED2_MASK (0x40)
88 
89 #define LED0_ON (LED_OUT_REG &=~LED0_MASK)
90 #define LED0_OFF (LED_OUT_REG |= LED0_MASK)
91 #define LED0_TOGGLE (LED_OUT_REG ^= LED0_MASK)
92 
93 #define LED1_ON (LED_OUT_REG &=~LED1_MASK)
94 #define LED1_OFF (LED_OUT_REG |= LED1_MASK)
95 #define LED1_TOGGLE (LED_OUT_REG ^= LED1_MASK)
96 
97 #define LED2_ON (LED_OUT_REG &=~LED2_MASK)
98 #define LED2_OFF (LED_OUT_REG |= LED2_MASK)
99 #define LED2_TOGGLE (LED_OUT_REG ^= LED2_MASK)
100 
105 #define CC2420_PARAMS_BOARD {.spi = SPI_DEV(0), \
106  .spi_clk = SPI_CLK_1MHZ , \
107  .pin_cs = GPIO_PIN(P4, 2), \
108  .pin_fifo = GPIO_PIN(P1, 3), \
109  .pin_fifop = GPIO_PIN(P1, 0), \
110  .pin_cca = GPIO_PIN(P1, 4), \
111  .pin_sfd = GPIO_PIN(P4, 1), \
112  .pin_vrefen = GPIO_PIN(P4, 5), \
113  .pin_reset = GPIO_PIN(P4, 6)}
114 
115 #ifdef __cplusplus
116 }
117 #endif
118 
120 #endif /* TELOSB_BOARD_H */