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) 2017 DAI Labor Technische Universität Berlin
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser General
5
* Public License v2.1. See the file LICENSE in the top level directory for more
6
* details.
7
*/
8
20
#ifndef BOARD_H
21
#define BOARD_H
22
23
#include "cpu.h"
24
#include "board_common.h"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
34
#define LED0_PIN GPIO_PIN(PORT_D, 5)
35
#define LED0_MASK (1 << 5)
36
#define LED0_ON (GPIO_D->DATA |= LED0_MASK)
37
#define LED0_OFF (GPIO_D->DATA &= ~LED0_MASK)
38
#define LED0_TOGGLE (GPIO_D->DATA ^= LED0_MASK)
39
40
#define LED1_PIN GPIO_PIN(PORT_D, 4)
41
#define LED1_MASK (1 << 4)
42
#define LED1_ON (GPIO_D->DATA |= LED1_MASK)
43
#define LED1_OFF (GPIO_D->DATA &= ~LED1_MASK)
44
#define LED1_TOGGLE (GPIO_D->DATA ^= LED1_MASK)
45
46
#define LED2_PIN GPIO_PIN(PORT_D, 3)
47
#define LED2_MASK (1 << 3)
48
#define LED2_ON (GPIO_D->DATA |= LED2_MASK)
49
#define LED2_OFF (GPIO_D->DATA &= ~LED2_MASK)
50
#define LED2_TOGGLE (GPIO_D->DATA ^= LED2_MASK)
57
#define BTN0_PIN GPIO_PIN(PORT_A, 3)
58
#define BTN0_MODE GPIO_IN_PU
65
#define CC1200_SPI_DEV SSI0
66
#define CC1200_MOSI_GPIO GPIO_PIN(PORT_B, 1)
67
#define CC1200_MISO_GPIO GPIO_PIN(PORT_B, 3)
68
#define CC1200_SCLK_GPIO GPIO_PIN(PORT_B, 2)
69
#define CC1200_CSN_GPIO GPIO_PIN(PORT_B, 5)
70
#define CC1200_RESET_GPIO GPIO_PIN(PORT_C, 7)
71
#define CC1200_GPD0_GPIO GPIO_PIN(PORT_B, 4)
72
#define CC1200_GPD2_GPIO GPIO_PIN(PORT_B, 0)
75
#ifdef __cplusplus
76
}
/* end extern "C" */
77
#endif
78
79
#endif
/* BOARD_H */
Generated on Sat Nov 23 2024 01:58:05 by
1.9.8