board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 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_conf.h"
23 #include "periph_cpu.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #define BACKLIGHT_PIN GPIO_PIN(PORT_K, 3)
34 #define BACKLIGHT_MASK (1 << 3)
37 #define BACKLIGHT_ON (GPIOK->BSRR = BACKLIGHT_MASK)
39 #define BACKLIGHT_OFF (GPIOK->BSRR = (BACKLIGHT_MASK << 16))
41 #define BACKLIGHT_TOGGLE (GPIOK->ODR ^= BACKLIGHT_MASK)
48 #define LCD_DISP_PIN GPIO_PIN(PORT_I, 12)
55 #define LCD_SCREEN_WIDTH 480
56 #define LCD_SCREEN_HEIGHT 272
63 #define LED0_PIN_NUM 1
64 #define LED0_PORT GPIO_PORT_I
65 #define LED0_PORT_NUM PORT_I
72 #define BTN0_PIN GPIO_PIN(PORT_I, 11)
73 #define BTN0_MODE GPIO_IN
80 #define FT5X06_PARAM_I2C_DEV I2C_DEV(1)
81 #define FT5X06_PARAM_INT_PIN GPIO_PIN(PORT_I, 13)
82 #define FT5X06_PARAM_XMAX LCD_SCREEN_WIDTH
83 #define FT5X06_PARAM_YMAX LCD_SCREEN_HEIGHT
84 #define FT5X06_PARAM_XYCONV FT5X06_SWAP_XY
85 #define FT5X06_PARAM_TYPE FT5X06_TYPE_FT5336
88 #ifdef __cplusplus
89 }
90 #endif
91 
92 #include "stm32_leds.h"
93 
Peripheral MCU configuration for the Zigduino board.
Common LED macros.