analog.h
Go to the documentation of this file.00001 00043 #ifndef _ANALOG_H 00044 #define _ANALOG_H 00045 00046 #include <inttypes.h> 00047 00054 #define AN0 0x00 00055 00056 #define AN1 0x01 00057 00058 #define AN2 0x02 00059 00060 #define AN3 0x03 00061 00062 #define AN4 0x04 00063 00064 #define AN5 0x05 00065 00066 #define AN6 0x06 00067 00068 #define AN7 0x07 00069 00070 #define AN8 0x08 00071 00072 #define AN9 0x09 00073 00074 #define AN10 0x0A 00075 00076 #define AN11 0x0B 00077 00078 #define AN12 0x0C 00079 00080 #define AN13 0x0D 00081 00082 #define AN14 0x0E 00083 00084 #define AN15 0x0F 00085 00087 #define BOM_PORT AN0 00088 00089 #define EXT_MUX AN7 00090 00091 #define WHEEL_PORT AN10 00092 00093 #define BATT_PORT AN11 00094 00096 #define ADC_LOOP_RUNNING 1 00097 00098 #define ADC_LOOP_STOPPED 0 00099 00101 #define ADC_START 1 00102 00103 #define ADC_STOP 0 00104 00105 #define ADMUX_OPT 0x60 00106 00108 typedef struct { 00109 uint8_t adc8; 00110 uint16_t adc10; 00111 } adc_t; 00112 00113 00116 void analog_init(int start_conversion); 00118 void analog_start_loop(void); 00120 void analog_stop_loop(void); 00122 int analog_loop_status(void); 00124 unsigned int analog8(int which); 00126 unsigned int analog10(int which); 00128 int wheel(void); 00130 unsigned int analog_get8(int which); 00132 unsigned int analog_get10(int which); 00133 00134 //end group 00136 00137 #endif 00138
Generated on Thu May 17 00:00:09 2012 for libdragonfly by
1.6.1