Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 Beuth Hochschule für Technik Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
19#ifndef BOARD_H
20#define BOARD_H
21
22#include "lpc23xx.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32#define LED0_PIN GPIO_PIN(2, 0)
33#define LED1_PIN GPIO_PIN(2, 1)
34#define LED2_PIN GPIO_PIN(2, 2)
35#define LED3_PIN GPIO_PIN(2, 3)
36#define LED4_PIN GPIO_PIN(2, 4)
37#define LED5_PIN GPIO_PIN(2, 5)
38#define LED6_PIN GPIO_PIN(2, 6)
39#define LED7_PIN GPIO_PIN(2, 7)
40
41#define LED0_MASK (BIT0)
42#define LED1_MASK (BIT1)
43#define LED2_MASK (BIT2)
44#define LED3_MASK (BIT3)
45#define LED4_MASK (BIT4)
46#define LED5_MASK (BIT5)
47#define LED6_MASK (BIT6)
48#define LED7_MASK (BIT7)
49
50#define LED0_ON (FIO2SET = LED0_MASK)
51#define LED0_OFF (FIO2CLR = LED0_MASK)
52#define LED0_TOGGLE (FIO2PIN ^= LED0_MASK)
53
54#define LED1_ON (FIO2SET = LED1_MASK)
55#define LED1_OFF (FIO2CLR = LED1_MASK)
56#define LED1_TOGGLE (FIO2PIN ^= LED1_MASK)
57
58#define LED2_ON (FIO2SET = LED2_MASK)
59#define LED2_OFF (FIO2CLR = LED2_MASK)
60#define LED2_TOGGLE (FIO2PIN ^= LED2_MASK)
61
62#define LED3_ON (FIO2SET = LED3_MASK)
63#define LED3_OFF (FIO2CLR = LED3_MASK)
64#define LED3_TOGGLE (FIO2PIN ^= LED3_MASK)
65
66#define LED4_ON (FIO2SET = LED4_MASK)
67#define LED4_OFF (FIO2CLR = LED4_MASK)
68#define LED4_TOGGLE (FIO2PIN ^= LED4_MASK)
69
70#define LED5_ON (FIO2SET = LED5_MASK)
71#define LED5_OFF (FIO2CLR = LED5_MASK)
72#define LED5_TOGGLE (FIO2PIN ^= LED5_MASK)
73
74#define LED6_ON (FIO2SET = LED6_MASK)
75#define LED6_OFF (FIO2CLR = LED6_MASK)
76#define LED6_TOGGLE (FIO2PIN ^= LED6_MASK)
77
78#define LED7_ON (FIO2SET = LED7_MASK)
79#define LED7_OFF (FIO2CLR = LED7_MASK)
80#define LED7_TOGGLE (FIO2PIN ^= LED7_MASK)
87#define BTN0_PIN GPIO_PIN(2, 10)
88#define BTN0_MODE GPIO_IN
89#define BTN0_INT_FLANK GPIO_FALLING
96#define HD44780_PARAM_COLS (16U)
97#define HD44780_PARAM_ROWS (2U)
98#define HD44780_PARAM_PIN_RS GPIO_PIN(1, 28)
99#define HD44780_PARAM_PIN_RW GPIO_PIN(1, 29)
100#define HD44780_PARAM_PIN_ENABLE GPIO_PIN(1, 31)
101#define HD44780_PARAM_PINS_DATA { GPIO_PIN(1, 24), GPIO_PIN(1, 25), \
102 GPIO_PIN(1, 26), GPIO_PIN(1, 27), \
103 GPIO_UNDEF, GPIO_UNDEF, \
104 GPIO_UNDEF, GPIO_UNDEF }
111#ifdef MODULE_MTD_MCI
112#define MTD_0 mtd_dev_get(0)
113#endif
116#ifdef __cplusplus
117}
118#endif
119
120#endif /* BOARD_H */