mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/esp32: fix compilation of esp_hw_counter
This commit is contained in:
parent
f2a18a7663
commit
61bfa5372a
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user