I wrote an assembly routine to emulate the intrinsic function
__even_in_range, and although it might work I doubt that it accomplishes
anything significant. Take a look (below) at the only place where the
functions is used, in adc12.c. It is a simple switch statement with
only one valid case statement. Seems like it would be just as efficient
to use a single "IF __value = 6..." statement. Maybe I just don't
understand the significance of the intrinsic function _in this specific
case_, but I don't believe it is worthwhile to spend any more time on it
(except that I could use the assembler experience).
[code]
switch(__even_in_range(ADC12IV,34))
{
case 0: break; // Vector 0: No interrupt
case 2: break; // Vector 2: ADC overflow
case 4: break; // Vector 4: ADC timing
overflow
case 6: // Vector 6: ADC12IFG0
adc12_result = ADC12MEM0; // Move
results, IFG is cleared
adc12_data_ready = 1;
_BIC_SR_IRQ(LPM3_bits); // Exit
active CPU
break;
case 8: break; // Vector 8: ADC12IFG1
case 10: break; // Vector 10: ADC12IFG2
case 12: break; // Vector 12: ADC12IFG3
case 14: break; // Vector 14: ADC12IFG4
case 16: break; // Vector 16: ADC12IFG5
case 18: break; // Vector 18: ADC12IFG6
case 20: break; // Vector 20: ADC12IFG7
case 22: break; // Vector 22: ADC12IFG8
case 24: break; // Vector 24: ADC12IFG9
case 26: break; // Vector 26: ADC12IFG10
case 28: break; // Vector 28: ADC12IFG11
case 30: break; // Vector 30: ADC12IFG12
case 32: break; // Vector 32: ADC12IFG13
case 34: break; // Vector 34: ADC12IFG14
default: break;
}
[/code]
--
Paul
Sehorne owned or managed Web Sites
* Airport Homes <http://airporthomes.org/>
* Female Body Building <http://bodybuilding.sehorne.net/>
* Credit Repair <http://creditrepair.sehorne.net/>
* Personal Loans <http://personalloans.sehorne.net/>
* Shopping <http://shop.sehorne.net/>
* Hidden Valley Airpark <http://hiddenvalleyairpark.org/>