1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/esp32: fix cast to periph type

This commit is contained in:
Benjamin Valentin 2021-11-13 15:08:30 +01:00
parent eabc9a8042
commit 3d8e0d7f43
2 changed files with 4 additions and 4 deletions

View File

@ -592,7 +592,7 @@ static int _esp_can_config(can_t *dev)
/* route CAN interrupt source to CPU interrupt and enable it */
intr_matrix_set(PRO_CPU_NUM, ETS_CAN_INTR_SOURCE, CPU_INUM_CAN);
xt_set_interrupt_handler(CPU_INUM_CAN, _esp_can_intr_handler, (void*)dev);
xt_set_interrupt_handler(CPU_INUM_CAN, _esp_can_intr_handler, (void*)(uintptr_t)dev);
xt_ints_on(BIT(CPU_INUM_CAN));
/* set bittiming from parameters as given in device data */
@ -733,7 +733,7 @@ static int _esp_can_set_mode(can_t *dev, canopt_state_t state)
static void IRAM_ATTR _esp_can_intr_handler(void *arg)
{
can_t* dev = (can_t *)arg;
can_t* dev = (can_t *)(uintptr_t)arg;
assert(arg);

View File

@ -683,7 +683,7 @@ static const uint32_t transfer_int_mask = I2C_TRANS_COMPLETE_INT_ENA
void _i2c_transfer_timeout (void *arg)
{
i2c_t dev = (i2c_t)arg;
i2c_t dev = (i2c_t)(uintptr_t)arg;
/* reset the hardware if it I2C got stuck */
_i2c_reset_hw(dev);
@ -718,7 +718,7 @@ static void _i2c_transfer (i2c_t dev)
/* set a timer for the case the I2C hardware gets stuck */
xtimer_t i2c_timeout = {};
i2c_timeout.callback = _i2c_transfer_timeout;
i2c_timeout.arg = (void*)dev;
i2c_timeout.arg = (void*)(uintptr_t)dev;
xtimer_set(&i2c_timeout, I2C_TRANSFER_TIMEOUT);
/* start execution of commands in command pipeline registers */