Ioc.h

00001 #ifndef IOCCODE
00002 #define IOCCODE
00003 #include <GNU_defs.h>
00004 #include <realtime.h>
00005 
00013 
00015 #define NOE   0  
00016 #define RISEE 1 
00017 #define FALLE 2 
00018 #define ANYE 3 
00023 #define ARELOAD 2
00024 
00025 #define ASTOP   4
00026 
00033 typedef void __attribute__((far))(*count_callback)(int counter, void *privatedata);
00034 
00035 
00036 typedef struct count_notify{
00037 count_callback callback;
00038 void *privatedata;
00039 }count_notify;
00040 
00041 
00042 typedef struct Count_Struct
00043 {
00044 u16 counter[8]; /* 8 16 bit counters */
00045 u16 countstart[8]; /* 8 16 bit counters */
00046 u8  countctl[8];
00047 u16 countreload[8];//reload values
00048 u8 rcount; //bitflag whether or not to reload
00049 u8 scount; //bitflag whether or not to stop the counter
00050 count_notify notify[8];
00051 }Count_Struct;
00052 
00053 
00068 int __attribute__((far))IOCPWMem(int Duty, int ioc, unsigned long frequency);
00069 
00074 void __attribute__((far))IOCstart(taskdata ioc);
00075 
00076 
00080 void __attribute__((far))IOCstop(taskdata ioc);
00081 
00082 
00096 int __attribute__((far))IOC_IC(int ict, u8 trigger, u16 reload, u8 flags);
00097 
00104 int __attribute__((far))IC_CallbackZ(int ic, count_callback callback, void *privatedata);
00105 
00106 
00111 int __attribute__((far))IC_Callback_off(int ic);
00112 
00119 u16 __attribute__((far))CountStart(int counter);
00120 
00126 u16 __attribute__((far))ReadCounter(int counter);
00127 
00132 int __attribute__((far))startcounter(int ic);
00138 int __attribute__((far))stopcounter(int ic);
00139 
00141 #endif

Generated on Fri Mar 3 17:25:45 2006 for EMAC-HCS12-SDK by  doxygen 1.4.6