Skip to content

Commit

Permalink
fixup! cpu/stm32: make ADC resolution uniform
Browse files Browse the repository at this point in the history
  • Loading branch information
crasbe committed Jan 16, 2025
1 parent 29b9517 commit 43ad615
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cpu/stm32/periph/adc_f0_g0_c0.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ int32_t adc_sample(adc_t line, adc_res_t res)
int sample;

/* check if resolution is applicable */
if ((res & ADC_CFGR_RES_Msk) != res) {
if ((res & ADC_CFGR_RES) != res) {
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion cpu/stm32/periph/adc_f2.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ int32_t adc_sample(adc_t line, adc_res_t res)
int sample;

/* check if resolution is applicable */
if ((res & ADC_CR1_RES_Msk) != res) {
if ((res & ADC_CR1_RES) != res) {
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion cpu/stm32/periph/adc_f3.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ int32_t adc_sample(adc_t line, adc_res_t res)
int sample;

/* Check if resolution is applicable */
if ((res & ADC_CFGR_RES_Msk) != res) {
if ((res & ADC_CFGR_RES) != res) {
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion cpu/stm32/periph/adc_f4_f7.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ int32_t adc_sample(adc_t line, adc_res_t res)
int sample;

/* check if resolution is applicable */
if ((res & ADC_CR1_RES_Msk) != res) {
if ((res & ADC_CR1_RES) != res) {
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion cpu/stm32/periph/adc_l0.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ int32_t adc_sample(adc_t line, adc_res_t res)
int sample;

/* check if resolution is applicable */
if ((res & ADC_CFGR1_RES_Msk) != res) {
if ((res & ADC_CFGR1_RES) != res) {
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion cpu/stm32/periph/adc_l1.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ int32_t adc_sample(adc_t line, adc_res_t res)
int sample;

/* check if resolution is applicable */
if ((res & ADC_CR1_RES_Msk) != res) {
if ((res & ADC_CR1_RES) != res) {
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion cpu/stm32/periph/adc_l4_wb.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ int32_t adc_sample(adc_t line, adc_res_t res)
int sample;

/* check if resolution is applicable */
if ((res & ADC_CFGR_RES_Msk) != res) {
if ((res & ADC_CFGR_RES) != res) {
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion cpu/stm32/periph/adc_wl.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ int32_t adc_sample(adc_t line, adc_res_t res)
int sample;

/* check if resolution is applicable */
if ((res & ADC_CFGR_RES_Msk) != res) {
if ((res & ADC_CFGR_RES) != res) {
return -1;
}

Expand Down

0 comments on commit 43ad615

Please sign in to comment.