ISIX-RTOS - small operating system for ARM microcontrollers 1.2

irqtimers.h

Go to the documentation of this file.
00001 /*
00002  * irqtimers.h
00003  *
00004  *  Created on: 05-03-2011
00005  *      Author: lucck
00006  */
00007 
00008 #ifndef ISIX_PRV_IRQTIMERS_H_
00009 #define ISIX_PRV_IRQTIMERS_H_
00010 /*-----------------------------------------------------------------------*/
00011 #include <isix/types.h>
00012 #include <prv/list.h>
00013 /*-----------------------------------------------------------------------*/
00014 #ifdef ISIX_CONFIG_USE_TIMERS
00015 /*-----------------------------------------------------------------------*/
00016 //Initialize vtimers infrastructure
00017 void isixp_vtimer_init(void);
00018 /*-----------------------------------------------------------------------*/
00019 //Call timer funcs in the interrupt context
00020 void isixp_vtimer_handle_time(tick_t jiffies);
00021 /*-----------------------------------------------------------------------*/
00022 struct vtimer_struct
00023 {
00024         tick_t jiffies;       /* Next timeout handle */
00025         tick_t timeout;                  /* Timeout timer value */
00026         void (*timer_handler)(void*); /* Next timer call */
00027         void *arg;                                        /* Function pointer */
00028         list_t inode;                             /* Innode list */
00029 };
00030 /*-----------------------------------------------------------------------*/
00031 #else
00032 static inline void isixp_vtimer_init(void) {}
00033 static inline void isixp_vtimer_handle_time(tick_t jiffies) { (void)jiffies; }
00034 #endif
00035 /*-----------------------------------------------------------------------*/
00036 #endif /* IRQTIMERS_H_ */
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines