remove obsolete files

This commit is contained in:
hg 2015-02-22 00:10:28 +01:00
parent c3305aeeae
commit 69d13b65d0
2 changed files with 0 additions and 66 deletions

View File

@ -1,44 +0,0 @@
/*
* adc.cpp
*
* Created on: 03.10.2014
* Author: wn
*/
#include <msp430g2553.h>
#include <isr_compat.h>
#include <stdint.h>
#include "adc.h"
void adcInit() {
ADC10CTL0 = ADC10SHT_0 | ADC10ON | SREF_0;
ADC10CTL1 = INCH_7 | ADC10SSEL_3 | ADC10DIV_2;
ADC10AE0 = BIT7;
}
uint16_t adcGet() {
uint16_t res = 0xffff;
ADC10CTL0 |= ENC | ADC10SC;
uint32_t timeOut = ADC_TIME_OUT;
while (1) {
timeOut--;
if (timeOut == 0)
break;
if ((ADC10CTL0 & ADC10IFG) != 0) {
res = ADC10MEM;
res >>= 1;
ADC10CTL0 &= ~(ADC10IFG | ENC);
break;
}
}
return res;
}

View File

@ -1,22 +0,0 @@
/*
* adc.h
*
* Created on: 03.10.2014
* Author: wn
*/
#ifndef ADC_H_
#define ADC_H_
#include <stdint.h>
const uint32_t ADC_TIME_OUT = 100000;
const uint16_t ADC_MAX = 511;
void adcInit();
uint16_t adcGet();
#endif /* ADC_H_ */