Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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)
51
57
#define BTN0_PIN GPIO_PIN(PORT_A, 3)
58
#define BTN0_MODE GPIO_IN_PU
59
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)
73
78
void
board_init
(
void
);
79
80
#ifdef __cplusplus
81
}
/* end extern "C" */
82
#endif
83
84
#endif
/* BOARD_H */
85
board_init
void board_init(void)
Board level initialization.
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17