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) 2020 Koen Zandberg <koen@bergzand.net>
3
* 2023 Gunar Schorcht <gunar@schorcht.net>
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
21
#ifndef BOARD_H
22
#define BOARD_H
23
24
#include "board_common.h"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
34
#define BTN0_PIN GPIO_PIN(PORT_A, 0)
35
#define BTN0_MODE GPIO_IN
36
#define BTN0_INT_FLANK GPIO_RISING
37
38
#define BTN1_PIN GPIO_PIN(PORT_C, 13)
39
#define BTN1_MODE GPIO_IN
40
#define BTN1_INT_FLANK GPIO_RISING
47
#define LED0_PIN GPIO_PIN(PORT_B, 5)
48
#define LED0_MASK (1 << 5)
49
#define LED0_ON (GPIOB->BC = LED0_MASK)
50
#define LED0_OFF (GPIOB->BOP = LED0_MASK)
51
#define LED0_TOGGLE (GPIOB->OCTL ^= LED0_MASK)
52
53
#define LED1_PIN GPIO_PIN(PORT_B, 0)
54
#define LED1_MASK (1 << 0)
55
#define LED1_ON (GPIOB->BC = LED1_MASK)
56
#define LED1_OFF (GPIOB->BOP = LED1_MASK)
57
#define LED1_TOGGLE (GPIOB->OCTL ^= LED1_MASK)
58
59
#define LED2_PIN GPIO_PIN(PORT_B, 1)
60
#define LED2_MASK (1 << 1)
61
#define LED2_ON (GPIOB->BC = LED2_MASK)
62
#define LED2_OFF (GPIOB->BOP = LED2_MASK)
63
#define LED2_TOGGLE (GPIOB->OCTL ^= LED2_MASK)
64
65
#define LED_RED_PIN LED0_PIN
66
#define LED_GREEN_PIN LED1_PIN
67
#define LED_BLUE_PIN LED2_PIN
74
#define MTD_0 mtd_dev_get(0)
81
#define SDCARD_SPI_PARAM_SPI SPI_DEV(0)
82
#define SDCARD_SPI_PARAM_CS GPIO_PIN(PORT_B, 12)
83
#define SDCARD_SPI_PARAM_CLK GPIO_PIN(PORT_B, 13)
84
#define SDCARD_SPI_PARAM_MISO GPIO_PIN(PORT_B, 14)
85
#define SDCARD_SPI_PARAM_MOSI GPIO_PIN(PORT_B, 15)
88
#ifdef __cplusplus
89
}
90
#endif
91
92
#endif
/* BOARD_H */
Generated on Sun Apr 28 2024 00:39:31 by
1.9.8