dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_adc.h
Go to the documentation of this file.
1 
17 /*
18  * This program is free software; you can redistribute it and/or modify
19  * it under the terms of the GNU General Public License as published by
20  * the Free Software Foundation; either version 3 of the License, or
21  * (at your option) any later version.
22  *
23  * This program is distributed in the hope that it will be useful, but
24  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
25  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
26  * for more details.
27  *
28  * You should have received a copy of the GNU General Public License along
29  * with this program; if not, see <http://www.gnu.org/licenses/>
30  */
31 
32 #ifndef PIOS_ADC_H
33 #define PIOS_ADC_H
34 
35 #include <stdint.h> /* uint*_t */
36 #include <stdbool.h> /* bool */
37 #include "pios_queue.h"
38 
40  void (*init)(uintptr_t id);
41  int32_t (*get_pin)(uintptr_t id, uint32_t pin);
42  uint8_t (*number_of_channels)(uintptr_t id);
43  float (*lsb_voltage)(uintptr_t id);
44 };
45 
46 /* Public Functions */
47 extern int32_t PIOS_ADC_GetChannelRaw(uint32_t channel);
48 extern float PIOS_ADC_GetChannelVolt(uint32_t channel);
49 
50 #endif /* PIOS_ADC_H */
51 
uint8_t id
float(* lsb_voltage)(uintptr_t id)
Definition: pios_adc.h:43
void(* init)(uintptr_t id)
Definition: pios_adc.h:40
uint8_t(* number_of_channels)(uintptr_t id)
Definition: pios_adc.h:42
float PIOS_ADC_GetChannelVolt(uint32_t channel)
int32_t PIOS_ADC_GetChannelRaw(uint32_t channel)
int32_t(* get_pin)(uintptr_t id, uint32_t pin)
Definition: pios_adc.h:41