mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Add definition of temperature sensor channel for STM32F446xx
This commit is contained in:
parent
392ff8eec8
commit
e6db8ffc26
3 changed files with 5 additions and 3 deletions
|
@ -40,6 +40,10 @@
|
||||||
|
|
||||||
#include "pg/adc.h"
|
#include "pg/adc.h"
|
||||||
|
|
||||||
|
// These are missing from STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_adc.h
|
||||||
|
#ifdef STM32F446xx
|
||||||
|
#define ADC_Channel_TempSensor ADC_Channel_18
|
||||||
|
#endif
|
||||||
|
|
||||||
const adcDevice_t adcHardware[] = {
|
const adcDevice_t adcHardware[] = {
|
||||||
{ .ADCx = ADC1, .rccADC = RCC_APB2(ADC1), .DMAy_Streamx = ADC1_DMA_STREAM, .channel = DMA_Channel_0 },
|
{ .ADCx = ADC1, .rccADC = RCC_APB2(ADC1), .DMAy_Streamx = ADC1_DMA_STREAM, .channel = DMA_Channel_0 },
|
||||||
|
|
|
@ -131,6 +131,7 @@
|
||||||
|
|
||||||
#define USE_ADC
|
#define USE_ADC
|
||||||
#define ADC_INSTANCE ADC1
|
#define ADC_INSTANCE ADC1
|
||||||
|
//#define ADC_INSTANCE ADC2
|
||||||
#define VBAT_ADC_PIN PC0
|
#define VBAT_ADC_PIN PC0
|
||||||
#define CURRENT_METER_ADC_PIN PC1
|
#define CURRENT_METER_ADC_PIN PC1
|
||||||
#define RSSI_ADC_PIN PC2
|
#define RSSI_ADC_PIN PC2
|
||||||
|
|
|
@ -51,10 +51,7 @@
|
||||||
#define I2C3_OVERCLOCK true
|
#define I2C3_OVERCLOCK true
|
||||||
#define USE_GYRO_DATA_ANALYSE
|
#define USE_GYRO_DATA_ANALYSE
|
||||||
#define USE_ADC
|
#define USE_ADC
|
||||||
#if !defined(STM32F446xx)
|
|
||||||
// This needs a library / pathing fix first
|
|
||||||
#define USE_ADC_INTERNAL
|
#define USE_ADC_INTERNAL
|
||||||
#endif
|
|
||||||
#endif // STM32F4
|
#endif // STM32F4
|
||||||
|
|
||||||
#ifdef STM32F722xx
|
#ifdef STM32F722xx
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue