Skip to content
Snippets Groups Projects
  • Martin Dybdal's avatar
    de76f73d
    esp32/machine_timer: Reuse Timer handles, deallocate only on soft-reset. · de76f73d
    Martin Dybdal authored
    The patch solves the problem where multiple Timer objects (e.g. multiple
    Timer(0) instances) could initialise multiple handles to the same internal
    timer.  The list of timers is now maintained not for "active" timers (where
    init is called), but for all timers created.  The timers are only removed
    from the list of timers on soft-reset (machine_timer_deinit_all).
    
    Fixes #4078.
    de76f73d
    History
    esp32/machine_timer: Reuse Timer handles, deallocate only on soft-reset.
    Martin Dybdal authored
    The patch solves the problem where multiple Timer objects (e.g. multiple
    Timer(0) instances) could initialise multiple handles to the same internal
    timer.  The list of timers is now maintained not for "active" timers (where
    init is called), but for all timers created.  The timers are only removed
    from the list of timers on soft-reset (machine_timer_deinit_all).
    
    Fixes #4078.