From a4c5daea3b0b6460eae16f27e38ec4a6ad7e4815 Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Sat, 10 Apr 2021 16:43:47 -0300 Subject: [PATCH] boards/atxmega-a3bu-xplained: Add i2c configuration Add J1 i2c bus configuration. Signed-off-by: Gerson Fernando Budke --- boards/atxmega-a3bu-xplained/Kconfig | 1 + .../include/periph_conf.h | 20 +++++++++++++++++++ .../Makefile.ci | 1 + 3 files changed, 22 insertions(+) diff --git a/boards/atxmega-a3bu-xplained/Kconfig b/boards/atxmega-a3bu-xplained/Kconfig index 28d507b807..1a91bd093e 100644 --- a/boards/atxmega-a3bu-xplained/Kconfig +++ b/boards/atxmega-a3bu-xplained/Kconfig @@ -15,6 +15,7 @@ config BOARD_ATXMEGA_A3BU_XPLAINED select HAS_PERIPH_CPUID select HAS_PERIPH_GPIO select HAS_PERIPH_GPIO_IRQ + select HAS_PERIPH_I2C select HAS_PERIPH_NVM select HAS_PERIPH_PM select HAS_PERIPH_TIMER diff --git a/boards/atxmega-a3bu-xplained/include/periph_conf.h b/boards/atxmega-a3bu-xplained/include/periph_conf.h index dd623388f5..6fe0161026 100644 --- a/boards/atxmega-a3bu-xplained/include/periph_conf.h +++ b/boards/atxmega-a3bu-xplained/include/periph_conf.h @@ -109,6 +109,26 @@ static const uart_conf_t uart_config[] = { #define UART_NUMOF ARRAY_SIZE(uart_config) /** @} */ +/** + * @name I2C configuration + * @{ + */ +static const i2c_conf_t i2c_config[] = { + { /* J1 */ + .dev = &TWIC, + .pwr = PWR_RED_REG(PWR_PORT_C, PR_TWI_bm), + .sda_pin = GPIO_PIN(PORT_C, 0), + .scl_pin = GPIO_PIN(PORT_C, 1), + .speed = I2C_SPEED_NORMAL, + .int_lvl = CPU_INT_LVL_LOW, + }, +}; + +#define I2C_0_ISR TWIC_TWIM_vect + +#define I2C_NUMOF ARRAY_SIZE(i2c_config) +/** @} */ + #ifdef __cplusplus } #endif diff --git a/tests/pkg_cryptoauthlib_internal-tests/Makefile.ci b/tests/pkg_cryptoauthlib_internal-tests/Makefile.ci index 130b9e7808..b88784ce41 100644 --- a/tests/pkg_cryptoauthlib_internal-tests/Makefile.ci +++ b/tests/pkg_cryptoauthlib_internal-tests/Makefile.ci @@ -9,6 +9,7 @@ BOARD_INSUFFICIENT_MEMORY := \ atmega328p \ atmega328p-xplained-mini \ atxmega-a1u-xpro \ + atxmega-a3bu-xplained \ avr-rss2 \ blackpill \ bluepill \