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 Freie Universität Berlin
3
* Copyright (C) 2015 PHYTEC Messtechnik GmbH
4
*
5
* This file is subject to the terms and conditions of the GNU Lesser General
6
* Public License v2.1. See the file LICENSE in the top level directory for more
7
* details.
8
*/
9
21
#ifndef BOARD_H
22
#define BOARD_H
23
24
#include "cpu.h"
25
#include "
periph_conf.h
"
26
27
#ifdef __cplusplus
28
extern
"C"
29
{
30
#endif
31
36
#define LED0_PIN GPIO_PIN(PORT_D, 6)
37
#define LED1_PIN GPIO_PIN(PORT_D, 4)
38
#define LED2_PIN GPIO_PIN(PORT_A, 4)
39
40
#define LED0_MASK (1 << 6)
41
#define LED1_MASK (1 << 4)
42
#define LED2_MASK (1 << 4)
43
44
#define LED0_ON (GPIOD->PCOR = LED0_MASK)
45
#define LED0_OFF (GPIOD->PSOR = LED0_MASK)
46
#define LED0_TOGGLE (GPIOD->PTOR = LED0_MASK)
47
48
#define LED1_ON (GPIOD->PCOR = LED1_MASK)
49
#define LED1_OFF (GPIOD->PSOR = LED1_MASK)
50
#define LED1_TOGGLE (GPIOD->PTOR = LED1_MASK)
51
52
#define LED2_ON (GPIOA->PCOR = LED2_MASK)
53
#define LED2_OFF (GPIOA->PSOR = LED2_MASK)
54
#define LED2_TOGGLE (GPIOA->PTOR = LED2_MASK)
61
#define BTN0_PIN GPIO_PIN(PORT_D, 1)
62
#define BTN0_MODE GPIO_IN_PU
69
#define BTN1_PORT PORTC
70
#define BTN1_PIN GPIO_PIN(PORT_C, 6)
71
#define BTN1_MODE GPIO_IN
80
#define KW2XRF_PARAM_SPI SPI_DEV(1)
81
#define KW2XRF_PARAM_SPI_CLK (SPI_CLK_10MHZ)
82
#define KW2XRF_PARAM_CS GPIO_PIN(KW2XDRF_PORT, KW2XDRF_PCS0_PIN)
83
#define KW2XRF_PARAM_INT GPIO_PIN(KW2XDRF_PORT, KW2XDRF_IRQ_PIN)
84
#define KW2XRF_PARAM_RESET GPIO_PIN(KW2XDRF_IRQ_PIN, KW2XDRF_RST_PIN)
85
#define KW2XRF_SHARED_SPI (0)
93
#define TMP00X_PARAM_ADDR (0x41)
96
#ifdef __cplusplus
97
}
98
#endif
99
100
#endif
/* BOARD_H */
periph_conf.h
Native CPU peripheral configuration.
Generated on Sun Dec 22 2024 10:22:27 by
1.9.8