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 
9 #pragma once
10 
21 #include "cpu.h"
22 #include "periph/gpio.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 #define LED0_PIN GPIO_PIN(PA, 23)
34 #define LED_PORT PORT->Group[PA]
35 #define LED0_MASK (1 << 23)
37 #define LED0_ON (LED_PORT.OUTSET.reg = LED0_MASK)
38 #define LED0_OFF (LED_PORT.OUTCLR.reg = LED0_MASK)
39 #define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
41 #define LED0_NAME "LED(Red)"
48 #define BUTTON_LATCH GPIO_PIN(PB, 0)
49 #define BUTTON_CLK GPIO_PIN(PB, 31)
50 #define BUTTON_OUT GPIO_PIN(PB, 30)
57 #define BACKLIGHT_PIN GPIO_PIN(PA, 1)
58 #define BACKLIGHT_PORT PORT->Group[PA]
59 #define BACKLIGHT_MASK (1 << 1)
60 #define BACKLIGHT_ON (BACKLIGHT_PORT.OUTSET.reg = BACKLIGHT_MASK)
61 #define BACKLIGHT_OFF (BACKLIGHT_PORT.OUTCLR.reg = BACKLIGHT_MASK)
68 #define ST77XX_PARAM_CNTRL ST77XX_CNTRL_ST7735
69 #define ST77XX_PARAM_SPI SPI_DEV(1)
70 #define ST77XX_PARAM_CS GPIO_PIN(PB, 7)
71 #define ST77XX_PARAM_DCX GPIO_PIN(PB, 5)
72 #define ST77XX_PARAM_RST GPIO_PIN(PA, 0)
73 #define ST77XX_PARAM_NUM_LINES (160U)
74 #define ST77XX_PARAM_RGB_CHANNELS (128U)
75 #define ST77XX_PARAM_RGB (1)
76 #define ST77XX_PARAM_INVERTED (0)
77 #define ST77XX_PARAM_ROTATION ST77XX_ROTATION_90
78 #define LCD_SCREEN_WIDTH (ST77XX_PARAM_NUM_LINES)
79 #define LCD_SCREEN_HEIGHT (ST77XX_PARAM_RGB_CHANNELS)
86 #define WS281X_PARAM_PIN (GPIO_PIN(PA, 15))
87 #define WS281X_PARAM_NUMOF (5U)
94 #define SPEAKER_ENABLE_PIN GPIO_PIN(PA, 27)
95 #define SPEAKER_PIN GPIO_PIN(PA, 2)
102 #define MTD_0 mtd_dev_get(0)
109 #define XTIMER_WIDTH (32)
110 #define XTIMER_HZ (1000000ul)
113 #ifdef __cplusplus
114 }
115 #endif
116 
Low-level GPIO peripheral driver interface definitions.