This commit is contained in:
hg 2015-02-21 23:47:37 +01:00
parent fd4cfa05bd
commit 907fb78d62
3 changed files with 2 additions and 2 deletions

View File

@ -33,6 +33,7 @@ uint16_t adcGet() {
if ((ADC10CTL0 & ADC10IFG) != 0) {
res = ADC10MEM;
res >>= 1;
ADC10CTL0 &= ~(ADC10IFG | ENC);
break;
}

View File

@ -12,7 +12,7 @@
const uint32_t ADC_TIME_OUT = 100000;
const uint16_t ADC_MAX = 1023;
const uint16_t ADC_MAX = 511;
void adcInit();
uint16_t adcGet();

View File

@ -27,7 +27,6 @@ void pwmInit() {
P1DIR |= BIT6;
P1SEL |= BIT6;
P1OUT = 0;
TACCR0 = PWM_MAX;
TACCR1 = 128;
TACCTL0 = CCIE;