00001
00002
00003
00004
00005
00006
00007
00015 #ifndef ATOD_H
00016 #define ATOD_H
00017 #include <GNU_defs.h>
00018 #include <realtime.h>
00019
00020 #define ATDCTL2 *((u8 *)(0x02 + offset))
00021 #define ADPU 0x80
00022 #define AFFC 0x40
00023 #define ASCIE 0x02
00024
00025 #define ATDCTL3 *((u8 *)(0x03 + offset))
00026 #define S8C 0x40
00027
00028
00029 #define ATDCTL4 *((u8 *)(0x04 + offset))
00030 #define PRE12 0x05
00031
00032 #define ATDCTL5 *((u8 *)(0x05 + offset))
00033 #define SCAN 0x20
00034 #define MULT 0x10
00035
00036 #define ATDSTAT0 *((u8 *)(0x06 + offset))
00037 #define ATDSTAT1 *((u8 *)(0x0B + offset))
00038 #define ATDDIEN *((u8 *)(0x0D + offset))
00039
00040 #define NEW 1
00041 #define OLD 0
00042
00043
00044
00045
00046
00047 #define ATDDRxL (0x11 + offset)
00048 #define ATDDRxH (0x10 + offset)
00049
00060 typedef void __attribute__((far))(*ATDcallback)(int module,
00061 volatile u16 *data_array,volatile u8 *status_array,void *privatedata);
00062
00063
00070 void __attribute__((far))AtoDst_sample(taskdata module);
00071
00078 void __attribute__((far))Install_AtoDcallback(int module,ATDcallback callback,void *privatedata);
00079
00084 void __attribute__((far))Remove_AtoDcallback(int module);
00085
00087 #endif