mirror of
https://github.com/apache/nuttx.git
synced 2026-08-08 14:07:17 +00:00
arch/risc-v: Fix Espressif timer registering ID
Fix Espressif timer registering ID. Espressif's general purpose timers are grouped in different Timer Groups, which may contain more than one general purpose timer. The current implementation is related to the timer groups (timer0 refers to Timer Group 0, for instance), but previous registering method was referring to the timer inside each group, which caused it to fail when more than one timer group was being selected because only the first timer on each group is being actually registered. Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This commit is contained in:
parent
4047b9f42b
commit
d649732877
1 changed files with 1 additions and 1 deletions
|
|
@ -601,7 +601,7 @@ int esp_timer_initialize(int group_id)
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
snprintf(devpath, PATH_MAX, "/dev/timer%" PRIu32, lower->hal.timer_id);
|
||||
snprintf(devpath, PATH_MAX, "/dev/timer%d", group_id);
|
||||
|
||||
/* Initialize the elements of lower half state structure */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue