arch/xtensa/esp32_spi&i2c: Get the CPU index when attaching an
interrupt. Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
parent
5588bc4ef6
commit
3e44c347fd
|
@ -1569,6 +1569,9 @@ FAR struct i2c_master_s *esp32_i2cbus_initialize(int port)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* Set up to receive peripheral interrupts on the current CPU */
|
||||
|
||||
config->cpu = up_cpu_index();
|
||||
up_disable_irq(priv->cpuint);
|
||||
esp32_attach_peripheral(config->cpu, config->periph, priv->cpuint);
|
||||
|
||||
|
|
|
@ -1473,6 +1473,9 @@ FAR struct spi_dev_s *esp32_spibus_initialize(int port)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* Set up to receive peripheral interrupts on the current CPU */
|
||||
|
||||
priv->config->cpu = up_cpu_index();
|
||||
up_disable_irq(priv->cpuint);
|
||||
esp32_attach_peripheral(priv->config->cpu,
|
||||
priv->config->periph,
|
||||
|
|
|
@ -1306,6 +1306,9 @@ FAR struct spi_slave_ctrlr_s *esp32_spislv_ctrlr_initialize(int port)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* Set up to receive peripheral interrupts on the current CPU */
|
||||
|
||||
priv->config->cpu = up_cpu_index();
|
||||
up_disable_irq(priv->cpuint);
|
||||
esp32_attach_peripheral(priv->config->cpu,
|
||||
priv->config->periph,
|
||||
|
|
Loading…
Reference in New Issue