DHCOM_HAL
Hardware-abstraction library (HAL) for multiple targets, including DHCOM modules
 All Data Structures Namespaces Files Functions Typedefs Enumerations Enumerator Macros Pages
ADC.h
Go to the documentation of this file.
1 /*
2  * ADC.h
3  *
4  * Created on: Apr 16, 2013
5  * Author: Peter Kishalov (PK), DH electronics GmbH
6  */
7 
8 #ifndef ADC_H_
9 #define ADC_H_
10 
11 
12 #include <DHCOM_HAL.h>
13 #include <hal/Types.h>
14 
15 
16 namespace dhcom
17 {
18 
19 
20 class ADCImpl;
21 class System;
22 
23 
25 {
26 public:
27  enum CHANNEL
28  {
32  };
33 
34  ADC(const System &sys, CHANNEL channel);
35  ~ADC();
36 
37  void open();
38  void close();
39  bool isOpen() const;
40 
41  uint16_t read() const;
42 
43 private:
44  ADCImpl * const impl_;
45 };
46 
47 
57 }
58 
59 #endif /* ADC_H_ */