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 Inria
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 "cpu.h"
23
#include "
periph/gpio.h
"
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
33
#define LED0_PIN GPIO_PIN(PA, 23)
35
#define LED_PORT PORT->Group[PA]
36
#define LED0_MASK (1 << 23)
38
#define LED0_ON (LED_PORT.OUTSET.reg = LED0_MASK)
39
#define LED0_OFF (LED_PORT.OUTCLR.reg = LED0_MASK)
40
#define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
42
#define LED0_NAME "LED(Red)"
49
#define BUTTON_LATCH GPIO_PIN(PB, 0)
50
#define BUTTON_CLK GPIO_PIN(PB, 31)
51
#define BUTTON_OUT GPIO_PIN(PB, 30)
58
#define BACKLIGHT_PIN GPIO_PIN(PA, 1)
59
#define BACKLIGHT_PORT PORT->Group[PA]
60
#define BACKLIGHT_MASK (1 << 1)
61
#define BACKLIGHT_ON (BACKLIGHT_PORT.OUTSET.reg = BACKLIGHT_MASK)
62
#define BACKLIGHT_OFF (BACKLIGHT_PORT.OUTCLR.reg = BACKLIGHT_MASK)
69
#define ST77XX_PARAM_CNTRL ST77XX_CNTRL_ST7735
70
#define ST77XX_PARAM_SPI SPI_DEV(1)
71
#define ST77XX_PARAM_CS GPIO_PIN(PB, 7)
72
#define ST77XX_PARAM_DCX GPIO_PIN(PB, 5)
73
#define ST77XX_PARAM_RST GPIO_PIN(PA, 0)
74
#define ST77XX_PARAM_NUM_LINES (160U)
75
#define ST77XX_PARAM_RGB_CHANNELS (128U)
76
#define ST77XX_PARAM_RGB (1)
77
#define ST77XX_PARAM_INVERTED (0)
78
#define ST77XX_PARAM_ROTATION ST77XX_ROTATION_90
79
#define LCD_SCREEN_WIDTH (ST77XX_PARAM_NUM_LINES)
80
#define LCD_SCREEN_HEIGHT (ST77XX_PARAM_RGB_CHANNELS)
87
#define WS281X_PARAM_PIN (GPIO_PIN(PA, 15))
88
#define WS281X_PARAM_NUMOF (5U)
95
#define SPEAKER_ENABLE_PIN GPIO_PIN(PA, 27)
96
#define SPEAKER_PIN GPIO_PIN(PA, 2)
103
#define MTD_0 mtd_dev_get(0)
110
#define XTIMER_WIDTH (32)
111
#define XTIMER_HZ (1000000ul)
114
#ifdef __cplusplus
115
}
116
#endif
117
118
#endif
/* BOARD_H */
gpio.h
Low-level GPIO peripheral driver interface definitions.
Generated on Sat Nov 16 2024 08:08:27 by
1.9.8