feat(esp32s3-eye): I2C

This commit is contained in:
Marco Casaroli 2023-10-10 10:57:40 +00:00 committed by Alan Carvalho de Assis
parent e99966ec70
commit 09ee163d37
2 changed files with 30 additions and 0 deletions

View File

@ -85,5 +85,21 @@ int esp32s3_bringup(void);
int esp32s3_gpio_init(void);
#endif
/****************************************************************************
* Name: board_i2c_init
*
* Description:
* Configure the I2C driver.
*
* Returned Value:
* Zero (OK) is returned on success; A negated errno value is returned
* to indicate the nature of any failure.
*
****************************************************************************/
#ifdef CONFIG_I2C_DRIVER
int board_i2c_init(void);
#endif
#endif /* __ASSEMBLY__ */
#endif /* __BOARDS_XTENSA_ESP32S3_ESP32S3_EYE_SRC_ESP32S3_EYE_H */

View File

@ -58,6 +58,10 @@
# include "esp32s3_rt_timer.h"
#endif
#ifdef CONFIG_ESP32S3_I2C
# include "esp32s3_i2c.h"
#endif
#ifdef CONFIG_WATCHDOG
# include "esp32s3_board_wdt.h"
#endif
@ -139,6 +143,16 @@ int esp32s3_bringup(void)
}
#endif
#ifdef CONFIG_I2C_DRIVER
/* Configure I2C peripheral interfaces */
ret = board_i2c_init();
if (ret < 0)
{
syslog(LOG_ERR, "Failed to initialize I2C driver: %d\n", ret);
}
#endif
#ifdef CONFIG_INPUT_BUTTONS
/* Register the BUTTON driver */