Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
firmware
boards
breezy
breezystm32
drv_adc.h
Go to the documentation of this file.
1
/*
2
drv_adc.h : Driver for STM32F103CB onboard ADC
3
4
Adapted from https://github.com/multiwii/baseflight/blob/master/src/drv_adc.h
5
6
This file is part of BreezySTM32.
7
8
BreezySTM32 is free software: you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation, either version 3 of the License, or
11
(at your option) any later version.
12
13
BreezySTM32 is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with BreezySTM32. If not, see <http://www.gnu.org/licenses/>.
20
*/
21
22
#pragma once
23
24
typedef
enum
{
25
ADC_BATTERY
= 0,
26
ADC_EXTERNAL_PAD
= 1,
27
ADC_EXTERNAL_CURRENT
= 2,
28
ADC_RSSI
= 3,
29
ADC_CHANNEL_MAX
= 4
30
}
AdcChannel
;
31
32
void
adcInit
(
bool
haveADC5);
33
uint16_t
adcGetChannel
(uint8_t channel);
ADC_EXTERNAL_CURRENT
Definition:
drv_adc.h:27
ADC_CHANNEL_MAX
Definition:
drv_adc.h:29
ADC_BATTERY
Definition:
drv_adc.h:25
adcInit
void adcInit(bool haveADC5)
Definition:
drv_adc.c:38
adcGetChannel
uint16_t adcGetChannel(uint8_t channel)
Definition:
drv_adc.c:97
AdcChannel
AdcChannel
Definition:
drv_adc.h:24
ADC_EXTERNAL_PAD
Definition:
drv_adc.h:26
ADC_RSSI
Definition:
drv_adc.h:28
rosflight_firmware
Author(s): Daniel Koch
, James Jackson
autogenerated on Wed Jul 3 2019 19:59:24