Skip to content

Commit

Permalink
Merge branch 'RIOT-OS:master' into dtls_cred_determ
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelStenzel authored Aug 10, 2023
2 parents 9401b2d + 91441db commit 0e1f4f3
Show file tree
Hide file tree
Showing 104 changed files with 2,910 additions and 383 deletions.
105 changes: 0 additions & 105 deletions .github/workflows/test-on-ryot.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ else
_LINK = $(if $(CPPMIX),$(LINKXX),$(LINK)) $$(find $(BASELIBS:%.module=$(BINDIR)/%/) -name "*.o" 2> /dev/null | sort) $(ARCHIVES_GROUP) $(LINKFLAGS) $(LINKFLAGPREFIX)-Map=$(BINDIR)/$(APPLICATION).map
endif # BUILDOSXNATIVE

COMPILE_COMMANDS_PATH ?= $(RIOTBASE)/compile_commands.json
COMPILE_COMMANDS_PATH ?= $(if $(findstring $(RIOTBASE),$(APPDIR)),$(RIOTBASE)/compile_commands.json, $(APPDIR)/compile_commands.json)
COMPILE_COMMANDS_FLAGS ?= --clangd
.PHONY: compile-commands
compile-commands: $(BUILDDEPS)
Expand Down
7 changes: 1 addition & 6 deletions boards/adafruit-itsybitsy-nrf52/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

This is a small formfactor (only 1.4" long by 0.7" wide) nRF52840 board made by Adafruit.

The board features one LED (LD1: blue), a user (SW1) and a
The board features one red LED (LD1), one DotStar / APA102 RGB LED, a user (SW1), a
reset button as well as 21 configurable external pins(6 of which can be analog in).

### Links
Expand Down Expand Up @@ -42,9 +42,4 @@ you may need to run `pip3 install --upgrade pip3` before being able to run `pip3

The usual way to obtain a console on this board is using an emulated USB serial port.


### Todo

Add support for the mini DotStar RGB LED

*/
9 changes: 9 additions & 0 deletions boards/adafruit-itsybitsy-nrf52/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ extern "C" {

/** @} */

/**
* @name APA102 / DotStar configuration
* @{
*/
#define APA102_PARAM_LED_NUMOF (1)
#define APA102_PARAM_DATA_PIN GPIO_PIN(0, 8)
#define APA102_PARAM_CLK_PIN GPIO_PIN(1, 9)
/** @} */

/**
* @name Button pin configuration
* @{
Expand Down
13 changes: 10 additions & 3 deletions boards/common/gd32v/include/cfg_i2c_default.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ extern "C" {
*/

/**
* @brief Enable the second I2C device `I2C_DEV(1)` by default
* @brief Disable the second I2C device `I2C_DEV(1)` by default
*
* The second I2C device `I2C_DEV(1)` is only defined if `I2C_DEV_1_USED`
* is set to 1 by the board.
* This allows to use the default configuration with one or two I2C devices
* depending on whether other peripherals are enabled that would collide with
* the I2C devices.
*/
#ifndef I2C_DEV_1_USED
#define I2C_DEV_1_USED
#define I2C_DEV_1_USED 0
#endif

/**
Expand All @@ -46,7 +51,7 @@ extern "C" {
* The default I2C device configuration allows to define up to two I2C devices
* `I2C_DEV(0)` and `I2C_DEV(1)`. `I2C_DEV(0)` is always defined if the I2C
* peripheral is enabled by the module `periph_spi`. The second I2C device
* `I2C_DEV(1)` is only defined if `I2C_DEV_1_USED` is defined by the board.
* `I2C_DEV(1)` is only defined if `I2C_DEV_1_USED` is set to 1 by the board.
* This allows to use the default configuration with one or two I2C devices
* depending on whether other peripherals are enabled that would collide with
* the I2C devices.
Expand All @@ -60,6 +65,7 @@ static const i2c_conf_t i2c_config[] = {
.rcu_mask = RCU_APB1EN_I2C0EN_Msk,
.irqn = I2C0_EV_IRQn,
},
#if I2C_DEV_1_USED
{
.dev = I2C1,
.speed = I2C_SPEED_NORMAL,
Expand All @@ -68,6 +74,7 @@ static const i2c_conf_t i2c_config[] = {
.rcu_mask = RCU_APB1EN_I2C1EN_Msk,
.irqn = I2C1_EV_IRQn,
}
#endif
};

#define I2C_NUMOF ARRAY_SIZE(i2c_config)
Expand Down
15 changes: 10 additions & 5 deletions boards/common/gd32v/include/cfg_spi_default.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ extern "C" {
*/

/**
* @brief Enable the second SPI device `SPI_DEV(1)` by default
* @brief Disable the second SPI device `SPI_DEV(1)` by default
*
* The second SPI device `SPI_DEV(1)` is only defined if `SPI_DEV_1_USED`
* is set to 1 by the board.
* This allows to use the default configuration with one or two SPI devices
* depending on whether other peripherals are enabled that would collide with
* the SPI devices.
*/
#ifndef SPI_DEV_1_USED
#define SPI_DEV_1_USED
#define SPI_DEV_1_USED 0
#endif

/**
Expand All @@ -57,7 +62,7 @@ extern "C" {
* the default CS signal is connected to an unused hardware.
*/
#ifndef SPI_DEV_1_CS
#define SPI_DEV_1_CS GPIO_PIN(PORT_A, 4)
#define SPI_DEV_1_CS GPIO_PIN(PORT_B, 5)
#endif

/**
Expand All @@ -66,7 +71,7 @@ extern "C" {
* The default SPI device configuration allows to define up to two SPI devices
* `SPI_DEV(0)` and `SPI_DEV(1)`. `SPI_DEV(0)` is always defined if the SPI
* peripheral is enabled by the module `periph_spi`. The second SPI device
* `SPI_DEV(1)` is only defined if `SPI_DEV_1_USED` is defined by the board.
* `SPI_DEV(1)` is only defined if `SPI_DEV_1_USED` is set to 1 by the board.
* This allows to use the default configuration with one or two SPI devices
* depending on whether other peripherals are enabled that would collide with
* the SPI devices.
Expand All @@ -81,7 +86,7 @@ static const spi_conf_t spi_config[] = {
.rcumask = RCU_APB1EN_SPI1EN_Msk,
.apbbus = APB1,
},
#ifdef SPI_DEV_1_USED
#if SPI_DEV_1_USED
{
.dev = SPI0,
.mosi_pin = GPIO_PIN(PORT_A, 7),
Expand Down
8 changes: 7 additions & 1 deletion boards/seeedstudio-gd32/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@
#define CONFIG_CLOCK_HXTAL MHZ(8) /**< HXTAL frequency */
#endif

#define SPI_DEV_1_USED /**< Enable SPI_DEV(1) for the connected flash */
#ifndef SPI_DEV_1_USED
#define SPI_DEV_1_USED 1 /**< Enable SPI_DEV(1) by default for the connected Flash */
#endif

#ifndef I2C_DEV_1_USED
#define I2C_DEV_1_USED 1 /**< Enable I2C_DEV(1) by default */
#endif

#include "periph_cpu.h"
#include "periph_common_conf.h"
Expand Down
39 changes: 39 additions & 0 deletions boards/sipeed-longan-nano-tft/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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.
#

config BOARD
default "sipeed-longan-nano-tft" if BOARD_SIPEED_LONGAN_NANO_TFT

config BOARD_SIPEED_LONGAN_NANO_TFT
bool
default y
select CPU_MODEL_GD32VF103CBT6
select BOARD_HAS_HXTAL
select BOARD_HAS_LXTAL
select HAS_HIGHLEVEL_STDIO
select HAS_PERIPH_ADC
select HAS_PERIPH_DAC
select HAS_PERIPH_I2C
select HAS_PERIPH_PWM
select HAS_PERIPH_SPI
select HAS_PERIPH_TIMER
select HAS_PERIPH_UART
select HAS_PERIPH_USBDEV
select HAS_RIOTBOOT
select HAS_TINYUSB_DEVICE

select HAVE_MTD_SDCARD_DEFAULT
select HAVE_SAUL_GPIO
select HAVE_ST7735

select MODULE_FATFS_VFS if MODULE_VFS_DEFAULT
select MODULE_USB_BOARD_RESET if KCONFIG_USB && TEST_KCONFIG

config FORCE_USB_STDIO
default y

source "$(RIOTBOARD)/common/gd32v/Kconfig"
2 changes: 2 additions & 0 deletions boards/sipeed-longan-nano-tft/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DIRS = $(RIOTBOARD)/sipeed-longan-nano
include $(RIOTBASE)/Makefile.base
5 changes: 5 additions & 0 deletions boards/sipeed-longan-nano-tft/Makefile.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ifneq (,$(filter disp_dev,$(USEMODULE)))
USEMODULE += st7735
endif

include $(RIOTBOARD)/sipeed-longan-nano/Makefile.dep
1 change: 1 addition & 0 deletions boards/sipeed-longan-nano-tft/Makefile.features
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(RIOTBOARD)/sipeed-longan-nano/Makefile.features
2 changes: 2 additions & 0 deletions boards/sipeed-longan-nano-tft/Makefile.include
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
INCLUDES += -I$(RIOTBOARD)/sipeed-longan-nano/include
include $(RIOTBOARD)/sipeed-longan-nano/Makefile.include
21 changes: 21 additions & 0 deletions boards/sipeed-longan-nano-tft/doc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
@defgroup boards_sipeed_longan_nano_tft Sipeed Longan Nano with TFT
@ingroup boards
@brief Support for the Sipeed Longan Nano board with TFT display
@author Gunar Schorcht <[email protected]>

The [Sipeed Longan Nano TFT](https://longan.sipeed.com/en) board is a version
of the \ref sipeed_longan_nano "Sipeed Longan Nano" development board
that is equipped with a TFT display with the following on-board components:

- GD32VF103CBT6 RISC-V MCU @108MHz
- USB Type C
- TF card slot
- 3 user LEDs
- 0.96" TFT display 160 x 80 pixel

@image html "https://media-cdn.seeedstudio.com/media/catalog/product/cache/7f7f32ef807b8c2c2215b49801c56084/1/1/114992425_1.jpg" "Sipeed Longan Nano" width=600

Detailed information about the board configuration and flashing can be found
in the \ref sipeed_longan_nano "Sipeed Longan Nano" documentation.
*/
16 changes: 3 additions & 13 deletions boards/sipeed-longan-nano/Kconfig
Original file line number Diff line number Diff line change
@@ -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
# General Public License v2.1. See the file LICENSE in the top level
Expand All @@ -25,24 +25,14 @@ config BOARD_SIPEED_LONGAN_NANO
select HAS_PERIPH_USBDEV
select HAS_RIOTBOOT
select HAS_TINYUSB_DEVICE
select HAVE_SAUL_GPIO

select HAVE_MTD_SDCARD_DEFAULT
select HAVE_SAUL_GPIO

select MODULE_FATFS_VFS if MODULE_VFS_DEFAULT
select MODULE_USB_BOARD_RESET if KCONFIG_USB && TEST_KCONFIG

config FORCE_USB_STDIO
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"
4 changes: 0 additions & 4 deletions boards/sipeed-longan-nano/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,5 @@ ifneq (,$(filter vfs_default,$(USEMODULE)))
USEMODULE += mtd
endif

ifneq (,$(filter disp_dev,$(USEMODULE)))
USEMODULE += st7735
endif

include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.dep.mk
include $(RIOTBOARD)/common/gd32v/Makefile.dep
4 changes: 0 additions & 4 deletions boards/sipeed-longan-nano/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
PORT_LINUX ?= /dev/ttyACM0
PROGRAMMER ?= dfu-util

ifneq (,$(filter st7735,$(USEMODULE)))
CFLAGS += '-DCONFIG_SIPEED_LONGAN_NANO_WITH_TFT=1'
endif

include $(RIOTBOARD)/common/gd32v/Makefile.include
Loading

0 comments on commit 0e1f4f3

Please sign in to comment.