1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/cpu/gd32v/Kconfig
bors[bot] f341ad6c9c
Merge #17045 #19243
17045: sys/coding: add XOR based coding module r=benpicco a=benpicco



19243: cpu/gd32v: add periph_gpio_ll and periph_gpio_ll_irq support r=benpicco a=gschorcht

### Contribution description

This PR provides the `periph_gpio_ll` and `periph_gpio_ll_irq` support for GD32VF103. Level triggered interrupts are emulated.

`periph_gpio_ll_irq` could be split off from this PR as a separate PR if necessary.

### Testing procedure

Use any GD32V board and connect PA0 -> PB0 and PA1 -> PB1 where PA is the output port and PB the input port. With these connections `tests/periph_gpio_ll` should work.
```
BOARD=sipeed-longan-nano make -j8 -C tests/periph_gpio_ll flash term
```

If necessary, change the input and output pins by setting the environment variables and connect the corresponding pins, for example for `seeedstudio-gd32` PA1 -> PB8 and PA8 -> PB9:
```
PIN_OUT_0=1 PIN_OUT_1=8  PIN_IN_0=8 PIN_IN_1=9 BOARD=seedstudio-gd32 make -j8 -C tests/periph_gpio_ll flash term
```

### Issues/PRs references


Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-02-07 17:39:20 +00:00

71 lines
1.7 KiB
Plaintext

# Copyright (c) 2020 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.
#
config CPU_FAM_GD32V
bool
select CPU_CORE_RV32IMAC
select HAS_ARCH_NUCLEI
select HAS_CPU_GD32V
select HAS_PERIPH_CLIC
select HAS_PERIPH_GPIO
select HAS_PERIPH_GPIO_IRQ
select HAS_PERIPH_GPIO_LL
select HAS_PERIPH_GPIO_LL_IRQ
select HAS_PERIPH_GPIO_LL_IRQ_LEVEL_TRIGGERED_HIGH
select HAS_PERIPH_GPIO_LL_IRQ_LEVEL_TRIGGERED_LOW
select HAS_PERIPH_FLASHPAGE
select HAS_PERIPH_FLASHPAGE_IN_ADDRESS_SPACE
select HAS_PERIPH_FLASHPAGE_PAGEWISE
select HAS_PERIPH_PM
select HAS_PERIPH_RTC
select HAS_PERIPH_RTC_MEM
select HAS_PERIPH_RTT
select HAS_PERIPH_TIMER
select HAS_PERIPH_TIMER_PERIODIC
select HAS_PERIPH_WDT
select MODULE_PERIPH_CLIC if TEST_KCONFIG
select MODULE_PERIPH_WDT if MODULE_PERIPH_PM && HAS_PERIPH_WDT
select PACKAGE_NMSIS_SDK
menu "GD32V configuration"
config CPU_MODEL_GD32VF103CBT6
bool
select CPU_FAM_GD32V
config CPU_MODEL_GD32VF103VBT6
bool
select CPU_FAM_GD32V
## Definition of specific features
config HAS_CPU_GD32V
bool
help
Indicates that a 'gd32v' cpu is being used.
config CPU_FAM
default "gd32v" if CPU_FAM_GD32V
config CPU_MODEL
default "gd32vf103cbt6" if CPU_MODEL_GD32VF103CBT6
config CPU_MODEL
default "gd32vf103vbt6" if CPU_MODEL_GD32VF103VBT6
config CPU
default "gd32v" if CPU_FAM_GD32V
config CPU_CORE
default "rv32imac" if CPU_CORE_RV32IMAC
rsource "periph/Kconfig"
endmenu
source "$(RIOTCPU)/riscv_common/Kconfig"