Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(el18): switch ADC channel and direction #3779

Merged
merged 1 commit into from
Jul 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions radio/src/targets/nv14/hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@
#define ADC_GPIO_PIN_POT1 LL_GPIO_PIN_6 // PA.06 VRA
#define ADC_GPIO_PIN_POT2 LL_GPIO_PIN_4 // PC.04 VRB
#define ADC_GPIO_PIN_SWA LL_GPIO_PIN_1 // PB.01
#define ADC_GPIO_PIN_SWB LL_GPIO_PIN_8 // PF.08
#define ADC_GPIO_PIN_SWB LL_GPIO_PIN_10 // PF.10
#define ADC_GPIO_PIN_SWC LL_GPIO_PIN_0 // PB.00
#define ADC_GPIO_PIN_SWD LL_GPIO_PIN_10 // PF.10
#define ADC_GPIO_PIN_SWD LL_GPIO_PIN_8 // PF.08
#define ADC_GPIO_PIN_SWE LL_GPIO_PIN_0 // PC.00
#define ADC_GPIO_PIN_SWF LL_GPIO_PIN_1 // PC.01
#define ADC_GPIO_PIN_SWG LL_GPIO_PIN_2 // PC.02
Expand All @@ -146,9 +146,9 @@
#define ADC_CHANNEL_POT1 LL_ADC_CHANNEL_6 // ADC12_IN6 -> ADC1_IN6
#define ADC_CHANNEL_POT2 LL_ADC_CHANNEL_14 // ADC12_IN14 -> ADC1_IN14
#define ADC_CHANNEL_SWA LL_ADC_CHANNEL_9 // ADC12_IN9 -> ADC1_IN9
#define ADC_CHANNEL_SWB LL_ADC_CHANNEL_6 // ADC3_IN6 -> ADC3_IN6
#define ADC_CHANNEL_SWB LL_ADC_CHANNEL_8 // ADC3_IN8 -> ADC3_IN8
#define ADC_CHANNEL_SWC LL_ADC_CHANNEL_8 // ADC12_IN8 -> ADC1_IN8
#define ADC_CHANNEL_SWD LL_ADC_CHANNEL_8 // ADC3_IN8 -> ADC3_IN8
#define ADC_CHANNEL_SWD LL_ADC_CHANNEL_6 // ADC3_IN6 -> ADC3_IN6
#define ADC_CHANNEL_SWE LL_ADC_CHANNEL_10 // ADC123_IN10-> ADC1_IN10
#define ADC_CHANNEL_SWF LL_ADC_CHANNEL_11 // ADC123_IN11-> ADC1_IN11
#define ADC_CHANNEL_SWG LL_ADC_CHANNEL_12 // ADC123_IN12-> ADC1_IN12
Expand Down Expand Up @@ -177,10 +177,10 @@

#define ADC_DIRECTION \
{ 0 /*STICK1*/, 0 /*STICK2*/, 0 /*STICK3*/, 0 /*STICK4*/, \
-1 /*POT1*/, 0 /*POT2*/, 0 /*SWA*/, 0 /*SWB*/, 0 /*SWC*/, \
0 /*SWD*/, 0 /*SWE*/, -1 /*SWF*/, -1 /*SWG*/, 0 /*SWH*/, \
0 /*TX_VOLTAGE*/, 0 /*TX_VBAT*/ \
}
-1 /*POT1*/, 0 /*POT2*/, 0 /*TX_VOLTAGE*/, 0 /*TX_VBAT*/, \
0 /*SWA*/, 0 /*SWB*/, 0 /*SWC*/, 0 /*SWD*/, 0 /*SWE*/, \
-1 /*SWF*/, -1 /*SWG*/, 0 /*SWH*/ \
}

// Power
#define PWR_RCC_AHB1Periph RCC_AHB1Periph_GPIOI
Expand Down