Commit a10aad08 authored by David Andruczyk's avatar David Andruczyk

Tweak currently inactive Analog port stuff

parent 8ba94b9b
......@@ -111,30 +111,27 @@ wheels Wheels[MAX_WHEELS] = {
//! ADC ISR for alternating between ADC pins 0 and 1
/*!
* Reads ADC ports 0 and 1 alternately. Port 0 is RPM, Port 1 is for
* future fun (possible wheel selection)
* future fun (possible crank/cam advance (VVT))
*/
ISR(ADC_vect){
if (analog_port == 0)
{
adc0 = ADCL | (ADCH << 8);
adc0_read_complete = true;
adc0_read_complete = true;
/* Flip to channel 1 */
//ADMUX |= B00000001;
//ADMUX = B01000000 | 1 ;
//analog_port = 1;
/* Trigger another conversion */
//ADCSRA |= B01000000;
return;
}
// if (analog_port == 1)
// {
// adc1 = ADCL | (ADCH << 8);
// adc1_read_complete = true;
// adc1_read_complete = true;
// /* Flip to channel 0 */
// /* Tell it to read ADC0, clear MUX0..3 */
// ADMUX &= B11110000;
// ADMUX = B01000000 | 0 ;
// analog_port = 0;
// /* Trigger another conversion */
// ADCSRA |= B01000000;
// return;
// }
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment