Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06a52fd commit 10ab130Copy full SHA for 10ab130
cores/esp32/esp32-hal-dac.c
@@ -32,6 +32,9 @@ bool __dacWrite(uint8_t pin, uint8_t value)
32
dac_oneshot_handle_t bus = (dac_oneshot_handle_t)perimanGetPinBus(pin, ESP32_BUS_TYPE_DAC_ONESHOT);
33
if(bus == NULL){
34
perimanSetBusDeinit(ESP32_BUS_TYPE_DAC_ONESHOT, dacDetachBus);
35
+ if(!perimanSetPinBus(pin, ESP32_BUS_TYPE_INIT, NULL)){
36
+ return false;
37
+ }
38
dac_channel_t channel = (pin == DAC_CHAN0_GPIO_NUM)?DAC_CHAN_0:DAC_CHAN_1;
39
dac_oneshot_config_t config = {
40
.chan_id = channel
0 commit comments