This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new b0f96fc204 esp32/i2c: Add macros to conform with other peripherals and 
fix typos
b0f96fc204 is described below

commit b0f96fc2045f3550659e7fcdf0666e05d0f1a742
Author: Lucas Saavedra Vaz <lucas....@espressif.com>
AuthorDate: Wed Oct 19 12:08:22 2022 -0300

    esp32/i2c: Add macros to conform with other peripherals and fix typos
    
    
    Fix coding style
    
    Co-authored-by: Petro Karashchenko <petro.karashche...@gmail.com>
---
 arch/xtensa/src/esp32/esp32_i2c.h                    | 8 ++++++++
 boards/xtensa/esp32/common/include/esp32_board_i2c.h | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/xtensa/src/esp32/esp32_i2c.h 
b/arch/xtensa/src/esp32/esp32_i2c.h
index 6e0e46cbd6..38078fab9e 100644
--- a/arch/xtensa/src/esp32/esp32_i2c.h
+++ b/arch/xtensa/src/esp32/esp32_i2c.h
@@ -43,6 +43,14 @@ extern "C"
 #define EXTERN extern
 #endif
 
+#ifdef CONFIG_ESP32_I2C0
+#  define ESP32_I2C0 0
+#endif /* CONFIG_ESP32_I2C0 */
+
+#ifdef CONFIG_ESP32_I2C1
+#  define ESP32_I2C1 1
+#endif /* CONFIG_ESP32_I2C1 */
+
 /****************************************************************************
  * Public Function Prototypes
  ****************************************************************************/
diff --git a/boards/xtensa/esp32/common/include/esp32_board_i2c.h 
b/boards/xtensa/esp32/common/include/esp32_board_i2c.h
index ac36171403..9b9cf2d5e9 100644
--- a/boards/xtensa/esp32/common/include/esp32_board_i2c.h
+++ b/boards/xtensa/esp32/common/include/esp32_board_i2c.h
@@ -48,7 +48,7 @@ extern "C"
  * Name: esp32_i2c_register
  *
  * Description:
- *   registar an ESP32 I2C interface.
+ *   Register an ESP32 I2C interface.
  *
  * Returned Value:
  *   Zero (OK) is returned on success; A negated errno value is returned

Reply via email to