mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/sipeed-longan-nano: remove TFT display handling
This commit is contained in:
parent
086e7bc35c
commit
d24a4eedee
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2023 Inria
|
# Copyright (c) 2023 Gunar Schorcht
|
||||||
#
|
#
|
||||||
# This file is subject to the terms and conditions of the GNU Lesser
|
# 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
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
@ -25,24 +25,14 @@ config BOARD_SIPEED_LONGAN_NANO
|
|||||||
select HAS_PERIPH_USBDEV
|
select HAS_PERIPH_USBDEV
|
||||||
select HAS_RIOTBOOT
|
select HAS_RIOTBOOT
|
||||||
select HAS_TINYUSB_DEVICE
|
select HAS_TINYUSB_DEVICE
|
||||||
select HAVE_SAUL_GPIO
|
|
||||||
|
|
||||||
select HAVE_MTD_SDCARD_DEFAULT
|
select HAVE_MTD_SDCARD_DEFAULT
|
||||||
|
select HAVE_SAUL_GPIO
|
||||||
|
|
||||||
select MODULE_FATFS_VFS if MODULE_VFS_DEFAULT
|
select MODULE_FATFS_VFS if MODULE_VFS_DEFAULT
|
||||||
select MODULE_USB_BOARD_RESET if KCONFIG_USB && TEST_KCONFIG
|
select MODULE_USB_BOARD_RESET if KCONFIG_USB && TEST_KCONFIG
|
||||||
|
|
||||||
config FORCE_USB_STDIO
|
config FORCE_USB_STDIO
|
||||||
default y
|
default y
|
||||||
|
|
||||||
menu "Sipeed Longan Nano Board Configuration"
|
|
||||||
|
|
||||||
config SIPEED_LONGAN_NANO_WITH_TFT
|
|
||||||
bool "Board with TFT display"
|
|
||||||
default y if MODULE_DISP_DEV
|
|
||||||
select HAVE_ST7735
|
|
||||||
help
|
|
||||||
Indicates that a Sipeed Longan Nano board with TFT display is used.
|
|
||||||
|
|
||||||
endmenu
|
|
||||||
|
|
||||||
source "$(RIOTBOARD)/common/gd32v/Kconfig"
|
source "$(RIOTBOARD)/common/gd32v/Kconfig"
|
||||||
|
@ -12,9 +12,5 @@ ifneq (,$(filter vfs_default,$(USEMODULE)))
|
|||||||
USEMODULE += mtd
|
USEMODULE += mtd
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter disp_dev,$(USEMODULE)))
|
|
||||||
USEMODULE += st7735
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.dep.mk
|
include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.dep.mk
|
||||||
include $(RIOTBOARD)/common/gd32v/Makefile.dep
|
include $(RIOTBOARD)/common/gd32v/Makefile.dep
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
PORT_LINUX ?= /dev/ttyACM0
|
PORT_LINUX ?= /dev/ttyACM0
|
||||||
PROGRAMMER ?= dfu-util
|
PROGRAMMER ?= dfu-util
|
||||||
|
|
||||||
ifneq (,$(filter st7735,$(USEMODULE)))
|
|
||||||
CFLAGS += '-DCONFIG_SIPEED_LONGAN_NANO_WITH_TFT=1'
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(RIOTBOARD)/common/gd32v/Makefile.include
|
include $(RIOTBOARD)/common/gd32v/Makefile.include
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
@defgroup boards_sipeed_longan_nano Sipeed Longan Nano board
|
@defgroup boards_sipeed_longan_nano Sipeed Longan Nano
|
||||||
@ingroup boards
|
@ingroup boards
|
||||||
@brief Support for the Sipeed Longan Nano board
|
@brief Support for the Sipeed Longan Nano board
|
||||||
@author Gunar Schorcht <gunar@schorcht.net>
|
@author Gunar Schorcht <gunar@schorcht.net>
|
||||||
|
|
||||||
|
\section sipeed_longan_nano Sipeed Longan Nano
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
The [Sipeed Longan Nano](https://longan.sipeed.com/en) is a
|
The [Sipeed Longan Nano](https://longan.sipeed.com/en) is a
|
||||||
@ -97,11 +99,10 @@ by pins.
|
|||||||
| UART_DEV(0) RX | PA10 | USART0 RX | UART RX | |
|
| UART_DEV(0) RX | PA10 | USART0 RX | UART RX | |
|
||||||
|
|
||||||
\n
|
\n
|
||||||
@note To use the TFT display of a Sipeed Longan Nano board, if available, the
|
@note For the Sipeed Longan Nano board version with TFT display, the
|
||||||
macro `CONFIG_SIPEED_LONGAN_NANO_WITH_TFT=1` has to be defined, for
|
`sipeed-longan-nano-tft` board definition has to be used.
|
||||||
example using the `CFLAGS` variable in the make command:
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
BOARD=sipeed-longan-nano CFLAGS='-DCONFIG_SIPEED_LONGAN_NANO_WITH_TFT=1' make ...
|
BOARD=sipeed-longan-nano-tft make ...
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
| Pin | Board Function | RIOT Function 1 | RIOT Function 2 | RIOT Function 3 |
|
| Pin | Board Function | RIOT Function 1 | RIOT Function 2 | RIOT Function 3 |
|
||||||
@ -162,6 +163,12 @@ BOARD=sipeed-longan-nano make -C examples/hello-world flash
|
|||||||
|
|
||||||
After flashing you need to leave bootloader mode again by pressing the RESET button.
|
After flashing you need to leave bootloader mode again by pressing the RESET button.
|
||||||
|
|
||||||
|
@note For the Sipeed Longan Nano board version with TFT display, the
|
||||||
|
`sipeed-longan-nano-tft` board definition has to be used.
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
BOARD=sipeed-longan-nano-tft make -C examples/hello-world flash
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
### Using an external debug adapter
|
### Using an external debug adapter
|
||||||
|
|
||||||
The board can also be flashed via a JTAG interface with OpenOCD (at least [release version 0.12.0]
|
The board can also be flashed via a JTAG interface with OpenOCD (at least [release version 0.12.0]
|
||||||
@ -187,11 +194,10 @@ PROGRAMMER=openocd OPENOCD_DEBUG_ADAPTER=jlink BOARD=sipeed-longan-nano make -C
|
|||||||
|
|
||||||
## Using the TFT Display
|
## Using the TFT Display
|
||||||
|
|
||||||
To use the TFT display of a Sipeed Longan Nano board, if available, the
|
To use the display of the Sipeed Longan Nano board version with TFT display,
|
||||||
macro `CONFIG_SIPEED_LONGAN_NANO_WITH_TFT=1` has to be defined, for
|
the `sipeed_longan_nano_tft` board definition has to be used, for example:
|
||||||
example using the `CFLAGS` variable in the make command:
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
BOARD=sipeed-longan-nano CFLAGS='-DCONFIG_SIPEED_LONGAN_NANO_WITH_TFT=1' make -C tests/drivers/st7735 flash
|
BOARD=sipeed-longan-nano-tft make -C tests/drivers/st7735 flash
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
## Accessing STDIO
|
## Accessing STDIO
|
||||||
|
@ -70,7 +70,7 @@ extern "C" {
|
|||||||
#define SDCARD_SPI_PARAM_MOSI GPIO_PIN(PORT_B, 15)
|
#define SDCARD_SPI_PARAM_MOSI GPIO_PIN(PORT_B, 15)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MODULE_ST7735) && defined(CONFIG_SIPEED_LONGAN_NANO_WITH_TFT)
|
#if defined(MODULE_ST7735) && defined(BOARD_SIPEED_LONGAN_NANO_TFT)
|
||||||
#define ST7735_PARAM_SPI SPI_DEV(1) /**< SPI device */
|
#define ST7735_PARAM_SPI SPI_DEV(1) /**< SPI device */
|
||||||
#define ST7735_PARAM_SPI_CLK SPI_CLK_5MHZ /**< SPI clock frequency */
|
#define ST7735_PARAM_SPI_CLK SPI_CLK_5MHZ /**< SPI clock frequency */
|
||||||
#define ST7735_PARAM_SPI_MODE SPI_MODE_0 /**< SPI mode */
|
#define ST7735_PARAM_SPI_MODE SPI_MODE_0 /**< SPI mode */
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#define CONFIG_CLOCK_HXTAL MHZ(8) /**< HXTAL frequency */
|
#define CONFIG_CLOCK_HXTAL MHZ(8) /**< HXTAL frequency */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_SIPEED_LONGAN_NANO_WITH_TFT
|
#if defined(BOARD_SIPEED_LONGAN_NANO_TFT)
|
||||||
#define SPI_DEV_1_USED /**< Enable SPI_DEV(1) if TFT is connected */
|
#define SPI_DEV_1_USED /**< Enable SPI_DEV(1) if TFT is connected */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ static const adc_conf_t adc_config[] = {
|
|||||||
{ .pin = GPIO_UNDEF, .dev = 0, .chan = 16 },
|
{ .pin = GPIO_UNDEF, .dev = 0, .chan = 16 },
|
||||||
/* ADC VREF channel */
|
/* ADC VREF channel */
|
||||||
{ .pin = GPIO_UNDEF, .dev = 0, .chan = 17 },
|
{ .pin = GPIO_UNDEF, .dev = 0, .chan = 17 },
|
||||||
#if !CONFIG_SIPEED_LONGAN_NANO_WITH_TFT
|
#if !defined(BOARD_SIPEED_LONGAN_NANO_TFT)
|
||||||
/* This conflicts with TFT pins if connected. */
|
/* This conflicts with TFT pins if connected. */
|
||||||
{ .pin = GPIO_PIN(PORT_B, 0), .dev = 0, .chan = 8 },
|
{ .pin = GPIO_PIN(PORT_B, 0), .dev = 0, .chan = 8 },
|
||||||
{ .pin = GPIO_PIN(PORT_B, 1), .dev = 0, .chan = 9 },
|
{ .pin = GPIO_PIN(PORT_B, 1), .dev = 0, .chan = 9 },
|
||||||
@ -72,7 +72,7 @@ static const adc_conf_t adc_config[] = {
|
|||||||
{ .pin = GPIO_PIN(PORT_A, 4), .dev = 0, .chan = 4 },
|
{ .pin = GPIO_PIN(PORT_A, 4), .dev = 0, .chan = 4 },
|
||||||
{ .pin = GPIO_PIN(PORT_A, 5), .dev = 0, .chan = 5 },
|
{ .pin = GPIO_PIN(PORT_A, 5), .dev = 0, .chan = 5 },
|
||||||
#endif /* !defined(MODULE_PERIPH_DAC) */
|
#endif /* !defined(MODULE_PERIPH_DAC) */
|
||||||
#endif /* !CONFIG_SIPEED_LONGAN_NANO_WITH_TFT */
|
#endif /* !defined(BOARD_SIPEED_LONGAN_NANO_TFT) */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ADC_NUMOF ARRAY_SIZE(adc_config)
|
#define ADC_NUMOF ARRAY_SIZE(adc_config)
|
||||||
@ -83,10 +83,10 @@ static const adc_conf_t adc_config[] = {
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
static const dac_conf_t dac_config[] = {
|
static const dac_conf_t dac_config[] = {
|
||||||
#if !CONFIG_SIPEED_LONGAN_NANO_WITH_TFT
|
#if !defined(BOARD_SIPEED_LONGAN_NANO_TFT)
|
||||||
{ .pin = GPIO_PIN(PORT_A, 4), .chan = 0 },
|
{ .pin = GPIO_PIN(PORT_A, 4), .chan = 0 },
|
||||||
{ .pin = GPIO_PIN(PORT_A, 5), .chan = 1 },
|
{ .pin = GPIO_PIN(PORT_A, 5), .chan = 1 },
|
||||||
#endif /* !CONFIG_SIPEED_LONGAN_NANO_WITH_TFT */
|
#endif /* !defined(BOARD_SIPEED_LONGAN_NANO_TFT) */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DAC_NUMOF ARRAY_SIZE(dac_config)
|
#define DAC_NUMOF ARRAY_SIZE(dac_config)
|
||||||
|
Loading…
Reference in New Issue
Block a user