Missing ADC Pins for ADC3, PF port #785
This commit is contained in:
parent
742e532f51
commit
f9f1e748dc
|
@ -108,9 +108,19 @@
|
|||
* ADC driver system settings.
|
||||
*/
|
||||
#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4
|
||||
|
||||
#ifndef STM32_ADC_USE_ADC1
|
||||
#define STM32_ADC_USE_ADC1 TRUE
|
||||
#endif /* STM32_ADC_USE_ADC1 */
|
||||
|
||||
#ifndef STM32_ADC_USE_ADC2
|
||||
#define STM32_ADC_USE_ADC2 TRUE
|
||||
#endif /* STM32_ADC_USE_ADC2 */
|
||||
|
||||
#ifndef STM32_ADC_USE_ADC3
|
||||
#define STM32_ADC_USE_ADC3 FALSE
|
||||
#endif /* STM32_ADC_USE_ADC3 */
|
||||
|
||||
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
|
||||
#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
|
||||
#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
|
||||
|
|
|
@ -123,9 +123,18 @@
|
|||
* ADC driver system settings.
|
||||
*/
|
||||
#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4
|
||||
#ifndef STM32_ADC_USE_ADC1
|
||||
#define STM32_ADC_USE_ADC1 TRUE
|
||||
#endif /* STM32_ADC_USE_ADC1 */
|
||||
|
||||
#ifndef STM32_ADC_USE_ADC2
|
||||
#define STM32_ADC_USE_ADC2 TRUE
|
||||
#endif /* STM32_ADC_USE_ADC2 */
|
||||
|
||||
#ifndef STM32_ADC_USE_ADC3
|
||||
#define STM32_ADC_USE_ADC3 FALSE
|
||||
#endif /* STM32_ADC_USE_ADC3 */
|
||||
|
||||
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
|
||||
#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
|
||||
#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
|
||||
|
|
|
@ -72,12 +72,12 @@ AdcDevice::AdcDevice(ADCConversionGroup* hwConfig) {
|
|||
#define PWM_PERIOD_FAST 10 /* PWM period (in PWM ticks). */
|
||||
#endif /* PWM_FREQ_FAST PWM_PERIOD_FAST */
|
||||
|
||||
// is there a reason to have this configurable?
|
||||
// is there a reason to have this configurable at runtime?
|
||||
#ifndef ADC_SLOW_DEVICE
|
||||
#define ADC_SLOW_DEVICE ADCD1
|
||||
#endif /* ADC_SLOW_DEVICE */
|
||||
|
||||
// is there a reason to have this configurable?
|
||||
// is there a reason to have this configurable at runtime?
|
||||
#ifndef ADC_FAST_DEVICE
|
||||
#define ADC_FAST_DEVICE ADCD2
|
||||
#endif /* ADC_FAST_DEVICE */
|
||||
|
|
|
@ -8,6 +8,11 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
#ifndef EFI_PIN_ADC9
|
||||
#define EFI_PIN_ADC9 GPIOB_1
|
||||
#endif /* EFI_PIN_ADC9 */
|
||||
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
extern ioportid_t PORTS[];
|
||||
#if defined(STM32F4XX) || defined(STM32F7XX)
|
||||
|
@ -58,7 +63,7 @@ brain_pin_e getAdcChannelBrainPin(const char *msg, adc_channel_e hwChannel) {
|
|||
case EFI_ADC_8:
|
||||
return GPIOB_0;
|
||||
case EFI_ADC_9:
|
||||
return GPIOB_1;
|
||||
return EFI_PIN_ADC9;
|
||||
case EFI_ADC_10:
|
||||
return GPIOC_0;
|
||||
case EFI_ADC_11:
|
||||
|
@ -97,7 +102,7 @@ adc_channel_e getAdcChannel(brain_pin_e pin) {
|
|||
return EFI_ADC_7;
|
||||
case GPIOB_0:
|
||||
return EFI_ADC_8;
|
||||
case GPIOB_1:
|
||||
case EFI_PIN_ADC9:
|
||||
return EFI_ADC_9;
|
||||
case GPIOC_0:
|
||||
return EFI_ADC_10;
|
||||
|
|
Loading…
Reference in New Issue