Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 DAI Labor Technische Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#include "cpu.h"
20#include "board_common.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#define LED0_PIN GPIO_PIN(PORT_D, 5)
31#define LED0_MASK (1 << 5)
32#define LED0_ON (GPIO_D->DATA |= LED0_MASK)
33#define LED0_OFF (GPIO_D->DATA &= ~LED0_MASK)
34#define LED0_TOGGLE (GPIO_D->DATA ^= LED0_MASK)
35
36#define LED1_PIN GPIO_PIN(PORT_D, 4)
37#define LED1_MASK (1 << 4)
38#define LED1_ON (GPIO_D->DATA |= LED1_MASK)
39#define LED1_OFF (GPIO_D->DATA &= ~LED1_MASK)
40#define LED1_TOGGLE (GPIO_D->DATA ^= LED1_MASK)
41
42#define LED2_PIN GPIO_PIN(PORT_D, 3)
43#define LED2_MASK (1 << 3)
44#define LED2_ON (GPIO_D->DATA |= LED2_MASK)
45#define LED2_OFF (GPIO_D->DATA &= ~LED2_MASK)
46#define LED2_TOGGLE (GPIO_D->DATA ^= LED2_MASK)
48
53#define BTN0_PIN GPIO_PIN(PORT_A, 3)
54#define BTN0_MODE GPIO_IN_PU
56
61#define CC1200_SPI_DEV SSI0
62#define CC1200_MOSI_GPIO GPIO_PIN(PORT_B, 1)
63#define CC1200_MISO_GPIO GPIO_PIN(PORT_B, 3)
64#define CC1200_SCLK_GPIO GPIO_PIN(PORT_B, 2)
65#define CC1200_CSN_GPIO GPIO_PIN(PORT_B, 5)
66#define CC1200_RESET_GPIO GPIO_PIN(PORT_C, 7)
67#define CC1200_GPD0_GPIO GPIO_PIN(PORT_B, 4)
68#define CC1200_GPD2_GPIO GPIO_PIN(PORT_B, 0)
70
71#ifdef __cplusplus
72} /* end extern "C" */
73#endif
74