From 51fd85957a6a301cb14ca63ef2e5fc9653df0893 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Fri, 7 Jul 2023 14:42:46 +0200 Subject: [PATCH] fixup! boards: add support for ESP32-S3-USB-OTG --- boards/esp32s3-usb-otg/board.c | 26 ++++++++++++++++++++++++++ boards/esp32s3-usb-otg/include/board.h | 4 ++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 boards/esp32s3-usb-otg/board.c diff --git a/boards/esp32s3-usb-otg/board.c b/boards/esp32s3-usb-otg/board.c new file mode 100644 index 0000000000000..c4331a7a5dcdd --- /dev/null +++ b/boards/esp32s3-usb-otg/board.c @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2023 Gunar Schorcht + * + * 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_esp32s3_usb_otg + * @{ + * + * @file + * @brief Board specific initializations for ESP32-S3-USB-OTG boards + * + * @author Gunar Schorcht + */ + +#include "board.h" + +void board_init(void) +{ +#if MODULE_ST7735 + gpio_init(LCD_BACKLIGHT, GPIO_OUT); +#endif +} diff --git a/boards/esp32s3-usb-otg/include/board.h b/boards/esp32s3-usb-otg/include/board.h index 769a7acf4ff38..de81aa75fcb65 100644 --- a/boards/esp32s3-usb-otg/include/board.h +++ b/boards/esp32s3-usb-otg/include/board.h @@ -163,8 +163,8 @@ #define ST7735_PARAM_INVERTED 1 #define ST7735_PARAM_RGB 1 -#define BACKLIGHT_ON gpio_clear(LCD_BACKLIGHT) -#define BACKLIGHT_OFF gpio_set(LCD_BACKLIGHT) +#define BACKLIGHT_ON gpio_set(LCD_BACKLIGHT) +#define BACKLIGHT_OFF gpio_clear(LCD_BACKLIGHT) #endif /** @} */