Project

General

Profile

Revision 1406

Added by James Kong over 14 years ago

Merged analog and bom changes from analog branch. Tested and working. Fixes #560

View differences:

analog.h
36 36
 * to analog.
37 37
	
38 38
 * @author Colony Project, CMU Robotics Club, based on firefly
39
 * code by Tom Lauwers
39
 * originally taken from fwr analog file (author: Tom Lauwers)
40
 * loop code written by Kevin Woo and James Kong
40 41
 */
41 42

  
42 43
#ifndef _ANALOG_H
......
91 92
/** @brief Analog port for the battery voltage detector **/
92 93
#define BATT_PORT  AN11
93 94

  
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

  
100
/** @brief Analog init parameter. Start the analog loop. **/
94 101
#define ADC_START 1
95
#define ADC_STOP 0
102
/** @brief Analog init parameter. Don't start the analog loop. **/
103
#define ADC_STOP  0
96 104

  
97 105
#define ADMUX_OPT 0x60
98 106

  
......
110 118
void analog_start_loop(void);
111 119
/** @brief Stops the analog loop. Doesn't do anything if the loop is already stopped. **/
112 120
void analog_stop_loop(void);
121
/** @brief Returns the status of the analog loop. **/
122
int analog_loop_status(void);
113 123
/** @brief Returns an 8-bit analog value from the look up table. Use this instead of analog_get8. **/
114 124
unsigned int analog8(int which);
115 125
/** @brief Returns an 10-bit analog value from the look up table. Use this instead of analog_get10. **/

Also available in: Unified diff