00001
00023 #if !defined(_AVR135_ICP_H_)
00024 #define _AVR135_ICP_H_ 1
00025
00026 #define ICP_ANALOG 1
00027
00028 #define ICP_BUFSIZE 1
00029 #if ICP_ANALOG
00030 #define ICP_RX_QSIZE ICP_BUFSIZE
00031 #else
00032 #define ICP_RX_QSIZE (ICP_BUFSIZE+1)
00033 #endif
00034
00035 #define ICP_SCALE 256U
00036 #if ICP_SCALE <= 256
00037 typedef unsigned char icp_sample_t;
00038 typedef unsigned int icp_total_t;
00039 #else
00040 typedef unsigned int icp_sample_t;
00041 typedef unsigned long icp_total_t;
00042 #endif
00043
00044 void icp_init(void);
00045 icp_sample_t icp_rx(void);
00046
00047 #endif