Revision 871
Recommitting the library so encoders work for other people as well.
analog.h | ||
---|---|---|
96 | 96 |
|
97 | 97 |
#define ADMUX_OPT 0x60 |
98 | 98 |
|
99 |
/** @brief Struct to hold the value of a particular analog port */ |
|
99 |
/** @brief Struct to hold the value of a particular analog port **/
|
|
100 | 100 |
typedef struct { |
101 | 101 |
uint8_t adc8; |
102 | 102 |
uint16_t adc10; |
... | ... | |
110 | 110 |
void analog_start_loop(void); |
111 | 111 |
/** @brief Stops the analog loop. Doesn't do anything if the loop is already stopped. **/ |
112 | 112 |
void analog_stop_loop(void); |
113 |
/** @brief Read an 8-bit number from an analog port. Loop must be stopped for this to work. **/
|
|
113 |
/** @brief Returns an 8-bit analog value from the look up table. Use this instead of analog_get8. **/
|
|
114 | 114 |
unsigned int analog8(int which); |
115 |
/** @brief Read a 10-bit number from an analog port. Loop must be stopped for this to work. **/
|
|
115 |
/** @brief Returns an 10-bit analog value from the look up table. Use this instead of analog_get10. **/
|
|
116 | 116 |
unsigned int analog10(int which); |
117 | 117 |
/** @brief Read the position of the wheel. **/ |
118 | 118 |
int wheel(void); |
119 |
/** @brief Returns an 8-bit analog value from the look up table. Use this instead of analog8. **/
|
|
119 |
/** @brief Read an 8-bit number from an analog port. Loop must be stopped for this to work. **/
|
|
120 | 120 |
unsigned int analog_get8(int which); |
121 |
/** @brief Returns an 10-bit analog value from the look up table. Use this instead of analog10. **/
|
|
121 |
/** @brief Read a 10-bit number from an analog port. Loop must be stopped for this to work. **/
|
|
122 | 122 |
unsigned int analog_get10(int which); |
123 | 123 |
|
124 | 124 |
|
Also available in: Unified diff