ASURO Library  2.80
adc_low.c
gehe zur Dokumentation dieser Datei
1 /****************************************************************************/
11 /*****************************************************************************
12 * *
13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or *
16 * any later version. *
17 * *
18 *****************************************************************************/
19 
20 #include "asuro.h"
21 
22 /****************************************************************************/
34 unsigned int ReadADC(unsigned int mux, unsigned int sleep)
35 {
36  unsigned int adc;
37 
38  if (sleep)
39  Sleep(sleep);
40 
41  cli();
42  adc=adcValue[mux];
43  sei();
44 
45  return adc>>6;
46 }
47