dRonin
adbada4
dRonin firmware
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
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
39
struct
pios_adc_driver
{
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
id
uint8_t id
Definition:
flyingpio_messages.h:118
pios_adc_driver::lsb_voltage
float(* lsb_voltage)(uintptr_t id)
Definition:
pios_adc.h:43
pios_adc_driver::init
void(* init)(uintptr_t id)
Definition:
pios_adc.h:40
pios_adc_driver::number_of_channels
uint8_t(* number_of_channels)(uintptr_t id)
Definition:
pios_adc.h:42
pios_queue.h
pios_adc_driver
Definition:
pios_adc.h:39
PIOS_ADC_GetChannelVolt
float PIOS_ADC_GetChannelVolt(uint32_t channel)
PIOS_ADC_GetChannelRaw
int32_t PIOS_ADC_GetChannelRaw(uint32_t channel)
pios_adc_driver::get_pin
int32_t(* get_pin)(uintptr_t id, uint32_t pin)
Definition:
pios_adc.h:41
flight
PiOS
inc
pios_adc.h
Generated by
1.8.6