Main Page | File List | Globals

icp.h

Go to the documentation of this file.
00001 // This file has been prepared for Doxygen automatic documentation generation.
00023 #if     !defined(_AVR135_ICP_H_)
00024 #define _AVR135_ICP_H_  1
00025 
00026 #define ICP_ANALOG              1                                       /* assume analog data           */
00027 
00028 #define ICP_BUFSIZE             1                                       /* queue only 1 element         */
00029 #if             ICP_ANALOG
00030 #define ICP_RX_QSIZE    ICP_BUFSIZE                     /* same as BUFSIZE                      */
00031 #else   /* ICP_DIGITAL */
00032 #define ICP_RX_QSIZE    (ICP_BUFSIZE+1)         /* 1 extra for queue management */
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  /* AVR135_ICP_H_ */

Generated on Wed Nov 2 14:20:47 2005 for AVR135: Using Timer Capture to Measure PWM Duty Cycle by  doxygen 1.4.4