board.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2014 INRIA
3  * SPDX-FileCopyrightText: 2015 Freie Universität Berlin
4  * SPDX-License-Identifier: LGPL-2.1-only
5  */
6 
7 #pragma once
8 
26 #include <stdint.h>
27 
28 #include "cpu.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
37 #ifndef __MSP430F2617__
38 #define __MSP430F2617__
39 #endif
40 
45 #define XTIMER_WIDTH (16)
46 #define XTIMER_BACKOFF (40)
53 #define CONFIG_ZTIMER_USEC_ADJUST_SET (99)
54 #define CONFIG_ZTIMER_USEC_ADJUST_SLEEP (100)
61 #define LED0_PIN GPIO_PIN(5, 4)
62 #define LED1_PIN GPIO_PIN(5, 6)
63 #define LED2_PIN GPIO_PIN(5, 5)
64 
65 #define LED_OUT_REG P5OUT
66 #define LED0_MASK (0x10)
67 #define LED1_MASK (0x40)
68 #define LED2_MASK (0x20)
69 
70 #define LED0_ON (LED_OUT_REG &=~LED0_MASK)
71 #define LED0_OFF (LED_OUT_REG |= LED0_MASK)
72 #define LED0_TOGGLE (LED_OUT_REG ^= LED0_MASK)
73 
74 #define LED1_ON (LED_OUT_REG &=~LED1_MASK)
75 #define LED1_OFF (LED_OUT_REG |= LED1_MASK)
76 #define LED1_TOGGLE (LED_OUT_REG ^= LED1_MASK)
77 
78 #define LED2_ON (LED_OUT_REG &=~LED2_MASK)
79 #define LED2_OFF (LED_OUT_REG |= LED2_MASK)
80 #define LED2_TOGGLE (LED_OUT_REG ^= LED2_MASK)
87 #define BTN0_PIN GPIO_PIN(2, 5)
88 #define BTN0_MASK (0x20)
89 #define BTN0_MODE GPIO_IN
90 
91 #define BTN0_PRESSED ((BTN0_PIN & BTN0_MASK) == 0)
92 #define BTN0_RELEASED ((BTN0_PIN & BTN0_MASK) != 0)
99 #define CC2420_PARAM_CS GPIO_PIN(P3, 0)
100 #define CC2420_PARAM_FIFO GPIO_PIN(P1, 3)
101 #define CC2420_PARAM_FIFOP GPIO_PIN(P1, 2)
102 #define CC2420_PARAM_CCA GPIO_PIN(P1, 4)
103 #define CC2420_PARAM_SFD GPIO_PIN(P4, 1)
104 #define CC2420_PARAM_VREFEN GPIO_PIN(P4, 5)
105 #define CC2420_PARAM_RESET GPIO_PIN(P4, 6)
108 #ifdef __cplusplus
109 }
110 #endif
111