diff --git a/cpu/esp32/esp-eth/esp_eth_netdev.c b/cpu/esp32/esp-eth/esp_eth_netdev.c index f874652f50..5b74bca9cb 100644 --- a/cpu/esp32/esp-eth/esp_eth_netdev.c +++ b/cpu/esp32/esp-eth/esp_eth_netdev.c @@ -93,7 +93,7 @@ static esp_err_t IRAM_ATTR _eth_input_callback(esp_eth_handle_t hdl, uint8_t *buffer, uint32_t len, void *priv) { - DEBUG("%s: buf=%p len=%d priv=%p\n", __func__, buffer, len, priv); + DEBUG("%s: buf=%p len=%"PRIu32" priv=%p\n", __func__, buffer, len, priv); assert(buffer != NULL); assert(len <= ETHERNET_MAX_LEN); @@ -145,7 +145,7 @@ static void _esp_eth_event_handler(void *arg, esp_event_base_t event_base, } break; default: - DEBUG("%s: event=%d\n", __func__, event_id); + DEBUG("%s: event=%"PRIi32"\n", __func__, event_id); break; } } diff --git a/cpu/esp32/periph/can.c b/cpu/esp32/periph/can.c index 74e85b5372..cdb55201ac 100644 --- a/cpu/esp32/periph/can.c +++ b/cpu/esp32/periph/can.c @@ -104,7 +104,7 @@ static void _esp_can_power_down(can_t *dev); static int _esp_can_set_mode(can_t *dev, canopt_state_t state); static void _esp_can_init_pins(void); static void _esp_can_deinit_pins(void); -static void IRAM_ATTR _esp_can_intr_handler(void *arg); +static void _esp_can_intr_handler(void *arg); /** ESP32 CAN low level device driver data */ static const candev_driver_t _esp_can_driver = { @@ -925,7 +925,7 @@ void can_init(can_t *dev, const can_conf_t *conf) can_device_calc_bittiming(ESP_CAN_CLOCK, &timing_const, &dev->candev.bittiming); /* initialize other members */ - dev->state = CAN_STATE_SLEEPING; + dev->state = CANOPT_STATE_SLEEP; dev->tx_frame = NULL; dev->rx_frames_wptr = 0; dev->rx_frames_rptr = 0; diff --git a/cpu/esp32/periph/timer.c b/cpu/esp32/periph/timer.c index 0d1e4e248a..579138f1c7 100644 --- a/cpu/esp32/periph/timer.c +++ b/cpu/esp32/periph/timer.c @@ -369,6 +369,8 @@ void IRAM_ATTR timer_stop(tim_t dev) #else /* MODULE_ESP_HW_COUNTER */ +#include "xtensa/config/core-isa.h" + /* hardware counter used as timer */ /** @@ -482,7 +484,7 @@ void IRAM hw_timer_handler(void* arg) int timer_init (tim_t dev, uint32_t freq, timer_cb_t cb, void *arg) { - DEBUG("%s dev=%u freq=%u cb=%p arg=%p\n", __func__, dev, freq, cb, arg); + DEBUG("%s dev=%u freq=%"PRIu32" cb=%p arg=%p\n", __func__, dev, freq, cb, arg); assert(dev < HW_TIMER_NUMOF); assert(freq == HW_TIMER_FREQUENCY); @@ -568,7 +570,7 @@ unsigned int IRAM timer_read(tim_t dev) void IRAM timer_start(tim_t dev) { - DEBUG("%s dev=%u @%u\n", __func__, dev, system_get_time()); + DEBUG("%s dev=%u @%"PRIu32"\n", __func__, dev, system_get_time()); assert(dev < HW_TIMER_NUMOF); assert(!_timers[dev].started); @@ -619,7 +621,7 @@ static void IRAM __timer_channel_start (struct _hw_timer_t* timer, struct hw_cha channel->cycles = channel->delta_time >> HW_TIMER_DELTA_RSHIFT; channel->remainder = channel->delta_time & HW_TIMER_DELTA_MASK; - DEBUG("%s cycles=%u remainder=%u @%u\n", + DEBUG("%s cycles=%"PRIu32" remainder=%"PRIu32" @%"PRIu32"\n", __func__, channel->cycles, channel->remainder, system_get_time()); /* start timer either with full cycles, remaining or minimum time */