Skip to content

Commit

Permalink
cpu/gd32v/periph_i2c: interrupt based driver
Browse files Browse the repository at this point in the history
  • Loading branch information
gschorcht committed Feb 17, 2023
1 parent ea300c3 commit 3fd04b7
Show file tree
Hide file tree
Showing 4 changed files with 551 additions and 208 deletions.
1 change: 1 addition & 0 deletions cpu/gd32v/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ config CPU_FAM_GD32V

select MODULE_PERIPH_CLIC if TEST_KCONFIG
select MODULE_PERIPH_WDT if MODULE_PERIPH_PM && HAS_PERIPH_WDT
select MODULE_ZTIMER_USEC if MODULE_PERIPH_I2C
select PACKAGE_NMSIS_SDK

menu "GD32V configuration"
Expand Down
4 changes: 4 additions & 0 deletions cpu/gd32v/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ ifneq (,$(filter periph_pm,$(USEMODULE)))
FEATURES_REQUIRED += periph_wdt
endif

ifneq (,$(filter periph_i2c,$(USEMODULE)))
USEMODULE += ztimer_usec
endif

include $(RIOTCPU)/riscv_common/Makefile.dep
2 changes: 1 addition & 1 deletion cpu/gd32v/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ typedef struct {
gpio_t scl_pin; /**< scl pin number */
gpio_t sda_pin; /**< sda pin number */
uint32_t rcu_mask; /**< bit in clock enable register */
uint8_t irqn; /**< I2C event interrupt number */
IRQn_Type irqn; /**< I2C event interrupt number */
} i2c_conf_t;

/**
Expand Down
Loading

0 comments on commit 3fd04b7

Please sign in to comment.