Revision 335
Rewrote bom.c and bom.h for the new analog8 code and for compatibility with bom 1.5 and
rbom. BOM values are now buffered and updating them will require a call to bom_refresh.
Old bom function calls have been left for backwards compatibility, but are now
deprecated. See comments for appropriate use. BOM 1.5 and rbom sections have not been
implemented yet.
Fixed some analog bugs. Made some analog functions static.
May not compile! Not tested!
analog.c | ||
---|---|---|
48 | 48 |
* @{ |
49 | 49 |
**/ |
50 | 50 |
|
51 |
int adc_loop_running = 0; |
|
52 |
int adc_current_port = 0; |
|
53 |
adc_t an_val[10]; |
|
51 |
static int adc_loop_running = 0;
|
|
52 |
static int adc_current_port = 0;
|
|
53 |
static adc_t an_val[10];
|
|
54 | 54 |
|
55 | 55 |
/** |
56 | 56 |
* Initializes the ADC. |
... | ... | |
230 | 230 |
* |
231 | 231 |
* @see analog_init |
232 | 232 |
**/ |
233 |
void set_adc_mux(int which) |
|
233 |
static void set_adc_mux(int which)
|
|
234 | 234 |
{ |
235 | 235 |
// mask so only proper bits are possible. |
236 | 236 |
PORTG = (PORTG & 0xE3) | ((which & 0x03) << 3) | (which & 0x04); |
Also available in: Unified diff