SimAVR
AVR Simulator
sim_cycle_timers.h File Reference
#include "sim_avr_types.h"
Include dependency graph for sim_cycle_timers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  avr_cycle_timer_slot_t
 Each timer instance contains the absolute cycle number they are hoping to run at, a function pointer to call and a parameter. More...
 
struct  avr_cycle_timer_pool_t
 Timer pool contains a pool of timer slots available, they all start queued into the 'free' qeueue, are migrated to the 'active' queue when needed and are re-queued to the free one when done. More...
 

Macros

#define MAX_CYCLE_TIMERS   64
 

Typedefs

typedef avr_cycle_count_t(* avr_cycle_timer_t) (struct avr_t *avr, avr_cycle_count_t when, void *param)
 
typedef struct avr_cycle_timer_slot_t avr_cycle_timer_slot_t
 Each timer instance contains the absolute cycle number they are hoping to run at, a function pointer to call and a parameter. More...
 
typedef struct avr_cycle_timer_slot_tavr_cycle_timer_slot_p
 
typedef struct avr_cycle_timer_pool_t avr_cycle_timer_pool_t
 Timer pool contains a pool of timer slots available, they all start queued into the 'free' qeueue, are migrated to the 'active' queue when needed and are re-queued to the free one when done. More...
 
typedef struct avr_cycle_timer_pool_tavr_cycle_timer_pool_p
 

Functions

void avr_cycle_timer_register (struct avr_t *avr, avr_cycle_count_t when, avr_cycle_timer_t timer, void *param)
 register for calling 'timer' in 'when' cycles More...
 
void avr_cycle_timer_register_usec (struct avr_t *avr, uint32_t when, avr_cycle_timer_t timer, void *param)
 register a timer to call in 'when' usec More...
 
void avr_cycle_timer_cancel (struct avr_t *avr, avr_cycle_timer_t timer, void *param)
 cancel a previously set timer More...
 
avr_cycle_count_t avr_cycle_timer_status (struct avr_t *avr, avr_cycle_timer_t timer, void *param)
 Check to see if a timer is present, if so, return the number (+1) of cycles left for it to fire, and if not present, return zero. More...
 
avr_cycle_count_t avr_cycle_timer_process (struct avr_t *avr)
 
void avr_cycle_timer_reset (struct avr_t *avr)