You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by bt...@apache.org on 2020/10/02 16:58:07 UTC
[incubator-nuttx] branch master updated: ESP32: Fixed the type of
cpuint variables in esp32_emac.c esp32_i2c.c esp32_spi.c esp32_spi_slave.c
This is an automated email from the ASF dual-hosted git repository.
btashton 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 a562fba ESP32: Fixed the type of cpuint variables in esp32_emac.c esp32_i2c.c esp32_spi.c esp32_spi_slave.c
a562fba is described below
commit a562fba971be8800a7015f970ab64225d9fff158
Author: saramonteiro <sa...@gmail.com>
AuthorDate: Sun Sep 27 19:13:12 2020 -0300
ESP32: Fixed the type of cpuint variables in esp32_emac.c esp32_i2c.c esp32_spi.c esp32_spi_slave.c
---
arch/xtensa/src/esp32/esp32_emac.c | 2 +-
arch/xtensa/src/esp32/esp32_gpio.c | 2 +-
arch/xtensa/src/esp32/esp32_i2c.c | 2 +-
arch/xtensa/src/esp32/esp32_serial.c | 4 ++--
arch/xtensa/src/esp32/esp32_spi.c | 2 +-
arch/xtensa/src/esp32/esp32_spi_slave.c | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/xtensa/src/esp32/esp32_emac.c b/arch/xtensa/src/esp32/esp32_emac.c
index 565f748..11e7bf2 100644
--- a/arch/xtensa/src/esp32/esp32_emac.c
+++ b/arch/xtensa/src/esp32/esp32_emac.c
@@ -208,7 +208,7 @@ struct esp32_emac_s
struct work_s timeoutwork; /* For TX timeout work to the work queue */
struct work_s pollwork; /* For deferring poll work to the work queue */
- uint32_t cpuint; /* SPI interrupt ID */
+ int cpuint; /* SPI interrupt ID */
sq_queue_t freeb; /* The free buffer list */
diff --git a/arch/xtensa/src/esp32/esp32_gpio.c b/arch/xtensa/src/esp32/esp32_gpio.c
index cbb90f5..802059e 100644
--- a/arch/xtensa/src/esp32/esp32_gpio.c
+++ b/arch/xtensa/src/esp32/esp32_gpio.c
@@ -57,7 +57,7 @@
****************************************************************************/
#ifdef CONFIG_ESP32_GPIO_IRQ
-static uint8_t g_gpio_cpuint;
+static int g_gpio_cpuint;
#endif
static const uint8_t g_pin2func[40] =
diff --git a/arch/xtensa/src/esp32/esp32_i2c.c b/arch/xtensa/src/esp32/esp32_i2c.c
index 66d2b44..0ea8e61 100644
--- a/arch/xtensa/src/esp32/esp32_i2c.c
+++ b/arch/xtensa/src/esp32/esp32_i2c.c
@@ -152,7 +152,7 @@ struct esp32_i2c_priv_s
uint8_t msgid; /* Current message ID */
ssize_t bytes; /* Processed data bytes */
- uint8_t cpuint; /* CPU interrupt assigned to this I2C */
+ int cpuint; /* CPU interrupt assigned to this I2C */
uint32_t error; /* I2C transform error */
diff --git a/arch/xtensa/src/esp32/esp32_serial.c b/arch/xtensa/src/esp32/esp32_serial.c
index a956ae3..30918e9 100644
--- a/arch/xtensa/src/esp32/esp32_serial.c
+++ b/arch/xtensa/src/esp32/esp32_serial.c
@@ -168,7 +168,7 @@ struct esp32_dev_s
const struct esp32_config_s *config; /* Constant configuration */
uint32_t baud; /* Configured baud */
uint32_t status; /* Saved status bits */
- uint8_t cpuint; /* CPU interrupt assigned to this UART */
+ int cpuint; /* CPU interrupt assigned to this UART */
uint8_t parity; /* 0=none, 1=odd, 2=even */
uint8_t bits; /* Number of bits (5-9) */
bool stopbits2; /* true: Configure with 2 stop bits instead of 1 */
@@ -711,7 +711,7 @@ static void esp32_detach(struct uart_dev_s *dev)
/* And release the CPU interrupt */
esp32_free_cpuint(priv->cpuint);
- priv->cpuint = 0xff;
+ priv->cpuint = -1;
}
/****************************************************************************
diff --git a/arch/xtensa/src/esp32/esp32_spi.c b/arch/xtensa/src/esp32/esp32_spi.c
index d57c8c7..9704f67 100644
--- a/arch/xtensa/src/esp32/esp32_spi.c
+++ b/arch/xtensa/src/esp32/esp32_spi.c
@@ -134,7 +134,7 @@ struct esp32_spi_priv_s
sem_t sem_isr;
- uint32_t cpuint; /* SPI interrupt ID */
+ int cpuint; /* SPI interrupt ID */
uint32_t frequency; /* Requested clock frequency */
uint32_t actual; /* Actual clock frequency */
diff --git a/arch/xtensa/src/esp32/esp32_spi_slave.c b/arch/xtensa/src/esp32/esp32_spi_slave.c
index c6a3606..505aa96 100644
--- a/arch/xtensa/src/esp32/esp32_spi_slave.c
+++ b/arch/xtensa/src/esp32/esp32_spi_slave.c
@@ -134,7 +134,7 @@ struct esp32_spislv_priv_s
const struct esp32_spislv_config_s *config; /* Port configuration */
- uint32_t cpuint; /* SPI interrupt ID */
+ int cpuint; /* SPI interrupt ID */
enum spi_mode_e mode; /* Actual SPI hardware mode */
uint8_t nbits; /* Actual SPI send/receive bits once transmission */