1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/stm32f746g-disco/include/board.h
Gunar Schorcht b04c84765b boards/stm32f746g-disco: add LD1 as LED0 definition
LED LD1 has no special function on the board STM32F746-DISCO and therefore can be used freely. This LED is also defined as ARDUINO LED pin D13 in the schematic.
2022-09-30 08:47:58 +02:00

95 lines
2.3 KiB
C

/*
* Copyright (C) 2021 Inria
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_stm32f746g-disco
* @{
*
* @file
* @brief Board specific definitions for the STM32F746G-DISCO
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*/
#ifndef BOARD_H
#define BOARD_H
#include "cpu.h"
#include "periph_conf.h"
#include "periph_cpu.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name LCD Backlight control defines
* @{
*/
#define BACKLIGHT_PIN GPIO_PIN(PORT_K, 3) /**< Backlight pin */
#define BACKLIGHT_MASK (1 << 3) /**< Backlight pin mask */
/** Set the backlight pin */
#define BACKLIGHT_ON (GPIOK->BSRR = BACKLIGHT_MASK)
/** Clear the backlight pin */
#define BACKLIGHT_OFF (GPIOK->BSRR = (BACKLIGHT_MASK << 16))
/** Toggle the backlight pin */
#define BACKLIGHT_TOGGLE (GPIOK->ODR ^= BACKLIGHT_MASK)
/** @} */
/**
* @name LCD display enable pin
* @{
*/
#define LCD_DISP_PIN GPIO_PIN(PORT_I, 12) /**< LCD screen enable pin */
/** @} */
/**
* @name LCD screen dimensions
* @{
*/
#define LCD_SCREEN_WIDTH 480 /**< LCD screen width */
#define LCD_SCREEN_HEIGHT 272 /**< LCD screen height */
/** @} */
/**
* @name Macros for controlling the on-board LEDs.
* @{
*/
#define LED0_PIN_NUM 1 /**< LD1 pin number */
#define LED0_PORT_NUM PORT_I /**< LD1 port */
/** @} */
/**
* @name User button
* @{
*/
#define BTN0_PIN GPIO_PIN(PORT_I, 11) /**< BTN0 pin */
#define BTN0_MODE GPIO_IN /**< BTN0 pin mode */
/** @} */
/**
* @name FT5X06 touch panel configuration
* @{
*/
#define FT5X06_PARAM_I2C_DEV I2C_DEV(1) /**< I2C device */
#define FT5X06_PARAM_INT_PIN GPIO_PIN(PORT_I, 13) /**< Interrupt pin */
#define FT5X06_PARAM_XMAX (480) /**< Max width */
#define FT5X06_PARAM_YMAX (272) /**< Max height */
#define FT5X06_PARAM_TYPE FT5X06_TYPE_FT5336 /**< Device type */
/** @} */
#ifdef __cplusplus
}
#endif
#include "stm32_leds.h"
#endif /* BOARD_H */
/** @} */