Skip to content

Commit dfe73a0

Browse files
committed
Fix error that would carry past python exception
1 parent 38e38b9 commit dfe73a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/stm32f4/common-hal/analogio/AnalogOut.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ void common_hal_analogio_analogout_construct(analogio_analogout_obj_t* self,
6060
} else {
6161
mp_raise_ValueError(translate("Invalid DAC pin supplied"));
6262
}
63-
dac_on[self->dac_index] = true;
6463

6564
//Only init if the shared DAC is empty or reset
6665
if (handle.Instance == NULL || handle.State == HAL_DAC_STATE_RESET) {
@@ -85,6 +84,7 @@ void common_hal_analogio_analogout_construct(analogio_analogout_obj_t* self,
8584
mp_raise_ValueError(translate("DAC Channel Init Error"));
8685
}
8786

87+
dac_on[self->dac_index] = true;
8888
self->pin = pin;
8989
claim_pin(pin);
9090
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy