Revision 1387
Changed analog to support status checking. Updated bom_refresh to use it.
analog.h | ||
---|---|---|
92 | 92 |
/** @brief Analog port for the battery voltage detector **/ |
93 | 93 |
#define BATT_PORT AN11 |
94 | 94 |
|
95 |
/** @brief Wait for current conversion to complete. Parameter for analog_stop_loop **/
|
|
96 |
#define WAIT_UNTIL_FINISHED 0
|
|
97 |
/** @brief Don't wait for current conversion to complete. Parameter for analog_stop_loop **/
|
|
98 |
#define SKIP_WAIT 1
|
|
95 |
/** @brief Analog loop status. ADC conversion running. **/
|
|
96 |
#define ADC_LOOP_RUNNING 1
|
|
97 |
/** @brief Analog loop status. No ADC conversion running.**/
|
|
98 |
#define ADC_LOOP_STOPPED 0
|
|
99 | 99 |
|
100 |
#define ADC_START 1 |
|
101 |
#define ADC_STOP 0 |
|
102 |
|
|
103 | 100 |
#define ADMUX_OPT 0x60 |
104 | 101 |
|
105 | 102 |
/** @brief Struct to hold the value of a particular analog port **/ |
... | ... | |
117 | 114 |
/** @brief Stops the analog loop. Doesn't do anything if the loop is already stopped. **/ |
118 | 115 |
void analog_stop_loop(void); |
119 | 116 |
/** @brief Returns the status of the analog loop. **/ |
120 |
int analog_loop_running(void);
|
|
117 |
int analog_loop_status(void);
|
|
121 | 118 |
/** @brief Returns an 8-bit analog value from the look up table. Use this instead of analog_get8. **/ |
122 | 119 |
unsigned int analog8(int which); |
123 | 120 |
/** @brief Returns an 10-bit analog value from the look up table. Use this instead of analog_get10. **/ |
Also available in: Unified diff