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 0dcf40c commit e920c21Copy full SHA for e920c21
src/lib/DenkoCoreIO.cpp
@@ -19,12 +19,14 @@ void Denko::setMode(byte p, byte m) {
19
// 111 = Digital Input/Output (ESP32 Only?)
20
m = m & 0b00000111;
21
22
- #if defined(ESP32) && defined(SOC_DAC_SUPPORTED)
23
- // Free the LEDC channel if leaving PWM mode.
+ #if defined(ESP32)
+ // Free the LEDC channel if leaving PWM mode.
24
if (m != 0b010) releaseLEDC(p);
25
26
// Disable attached DAC if leaving DAC mode.
27
- if (m != 0b100) dacDisable(p);
+ #if defined(SOC_DAC_SUPPORTED)
28
+ if (m != 0b100) dacDisable(p);
29
+ #endif
30
#endif
31
32
// On the SAMD21 and RA4M1, mode needs to be INPUT when using the DAC.
0 commit comments