1 #ifndef POWERUP_PPCLIB_TIME_H
    2 #define POWERUP_PPCLIB_TIME_H
    3 
    4 #define	PPCTIMERTAG_Dummy		(TAG_USER + 0x24000)
    5 
    6 /* PPCCreateTimerObject Tags */
    7 
    8 /* ptr to an optional error reason field
    9  */
   10 #define	PPCTIMERTAG_ERROR		(PPCTIMERTAG_Dummy + 0x0)
   11 
   12 /* use the CPU timer to do simple synchron
   13  * timer based operations
   14  */
   15 #define	PPCTIMERTAG_CPU			(PPCTIMERTAG_Dummy + 0x1)
   16 
   17 /* create a job in a 50Hz timer queue
   18  * which will send your task a signal after
   19  * the ticks you specified run to zero.
   20  * You specify the number of 50Hz ticks
   21  * with the Tag.
   22  */
   23 #define	PPCTIMERTAG_50HZ		(PPCTIMERTAG_Dummy + 0x2)
   24 
   25 /* The signalmask necessary for the 50Hz
   26  * timer to signal your task
   27  */
   28 #define	PPCTIMERTAG_SIGNALMASK		(PPCTIMERTAG_Dummy + 0x3)
   29 
   30 /* After the ticks ran down and the task
   31  * is signaled the timer request is removed from the queue.
   32  */
   33 #define	PPCTIMERTAG_AUTOREMOVE		(PPCTIMERTAG_Dummy + 0x4)
   34 
   35 
   36 /* PPCSetTimerObject() Tags */
   37 
   38 
   39 /* Start Timer,Start Job(add to the joblist) or
   40  * Start ticks for PPCGetTimerObject()
   41  */
   42 #define	PPCTIMERTAG_START		(PPCTIMERTAG_Dummy + 0x11)
   43 
   44 /* Stop Timer,Stop Job(remove from the joblist) or
   45  * Stop ticks for PPCGetTimerObject()
   46  */
   47 #define	PPCTIMERTAG_STOP		(PPCTIMERTAG_Dummy + 0x12)
   48 
   49 /* PPCGetTimerObject() Tags */
   50 
   51 /* Get ticks per second */
   52 #define	PPCTIMERTAG_TICKSPERSEC		(PPCTIMERTAG_Dummy + 0x13)
   53 
   54 /* Get current ticks */
   55 #define	PPCTIMERTAG_CURRENTTICKS	(PPCTIMERTAG_Dummy + 0x14)
   56 
   57 /* Get diff ticks after a start and stop */
   58 #define	PPCTIMERTAG_DIFFTICKS		(PPCTIMERTAG_Dummy + 0x15)
   59 
   60 /* Get diff microseconds after a start and stop */
   61 #define	PPCTIMERTAG_DIFFMICRO		(PPCTIMERTAG_Dummy + 0x16)
   62 
   63 /* Get diff seconds after a start and stop */
   64 #define	PPCTIMERTAG_DIFFSECS		(PPCTIMERTAG_Dummy + 0x17)
   65 
   66 /* Get diff minutes after a start and stop */
   67 #define	PPCTIMERTAG_DIFFMINS		(PPCTIMERTAG_Dummy + 0x18)
   68 
   69 /* Get diff hours after a start and stop */
   70 #define	PPCTIMERTAG_DIFFHOURS		(PPCTIMERTAG_Dummy + 0x19)
   71 
   72 /* Get diff days after a start and stop */
   73 #define	PPCTIMERTAG_DIFFDAYS		(PPCTIMERTAG_Dummy + 0x1a)
   74 
   75 
   76 
   77 #define	PPCTIMERERROR_OK	0
   78 #define	PPCTIMERERROR_MEMORY	1
   79 
   80 
   81 
   82 
   83 
   84 #endif