Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 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
10
#ifndef BOARD_H
11
#define BOARD_H
12
30
#include <stdint.h>
31
32
#include "cpu.h"
33
34
#ifdef __cplusplus
35
extern
"C"
{
36
#endif
37
41
#ifndef __MSP430F2617__
42
#define __MSP430F2617__
43
#endif
44
49
#define XTIMER_WIDTH (16)
50
#define XTIMER_BACKOFF (40)
57
#define CONFIG_ZTIMER_USEC_ADJUST_SET (99)
58
#define CONFIG_ZTIMER_USEC_ADJUST_SLEEP (100)
65
#define LED0_PIN GPIO_PIN(5, 4)
66
#define LED1_PIN GPIO_PIN(5, 6)
67
#define LED2_PIN GPIO_PIN(5, 5)
68
69
#define LED_OUT_REG P5OUT
70
#define LED0_MASK (0x10)
71
#define LED1_MASK (0x40)
72
#define LED2_MASK (0x20)
73
74
#define LED0_ON (LED_OUT_REG &=~LED0_MASK)
75
#define LED0_OFF (LED_OUT_REG |= LED0_MASK)
76
#define LED0_TOGGLE (LED_OUT_REG ^= LED0_MASK)
77
78
#define LED1_ON (LED_OUT_REG &=~LED1_MASK)
79
#define LED1_OFF (LED_OUT_REG |= LED1_MASK)
80
#define LED1_TOGGLE (LED_OUT_REG ^= LED1_MASK)
81
82
#define LED2_ON (LED_OUT_REG &=~LED2_MASK)
83
#define LED2_OFF (LED_OUT_REG |= LED2_MASK)
84
#define LED2_TOGGLE (LED_OUT_REG ^= LED2_MASK)
91
#define BTN0_PIN GPIO_PIN(2, 5)
92
#define BTN0_MASK (0x20)
93
#define BTN0_MODE GPIO_IN
94
95
#define BTN0_PRESSED ((BTN0_PIN & BTN0_MASK) == 0)
96
#define BTN0_RELEASED ((BTN0_PIN & BTN0_MASK) != 0)
103
#define CC2420_PARAM_CS GPIO_PIN(P3, 0)
104
#define CC2420_PARAM_FIFO GPIO_PIN(P1, 3)
105
#define CC2420_PARAM_FIFOP GPIO_PIN(P1, 2)
106
#define CC2420_PARAM_CCA GPIO_PIN(P1, 4)
107
#define CC2420_PARAM_SFD GPIO_PIN(P4, 1)
108
#define CC2420_PARAM_VREFEN GPIO_PIN(P4, 5)
109
#define CC2420_PARAM_RESET GPIO_PIN(P4, 6)
112
#ifdef __cplusplus
113
}
114
#endif
115
117
#endif
/* BOARD_H */
Generated on Sat Nov 23 2024 01:58:05 by
1.9.8