summaryrefslogtreecommitdiffstats
path: root/adc.c
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2007-04-04 14:08:03 +0200
committerneoraider <devnull@localhost>2007-04-04 14:08:03 +0200
commite26a1dc73313098cef235918d237f9b1a6e4cb5f (patch)
tree0dfc7f873db2f228b39509daed9b1e01cb5739dd /adc.c
parentdc1306244e3a7853c31cd94c5ac3d97aa6e6c0d5 (diff)
downloadrc2007-rescue-e26a1dc73313098cef235918d237f9b1a6e4cb5f.tar
rc2007-rescue-e26a1dc73313098cef235918d237f9b1a6e4cb5f.zip
Rescue: Weitere Grundfunktionen implementiert
Diffstat (limited to 'adc.c')
-rw-r--r--adc.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/adc.c b/adc.c
deleted file mode 100644
index 192d36c..0000000
--- a/adc.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "adc.h"
-
-#include <avr/io.h>
-
-
-void initADC() {
- ADMUX = (1<<REFS0);
- ADCSRA = (1<<ADEN)|(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0);
-}
-
-uint16_t getADCValue(int port) {
- ADMUX = (1<<REFS0)|(1<<ADLAR)|(port&0x07);
- ADCSRA |= (1<<ADSC);
-
- while(!(ADCSRA & (1<<ADIF)));
-
- return ADC;
-}