aboutsummaryrefslogtreecommitdiff
path: root/ports/esp32/machine_dac.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/esp32/machine_dac.c')
-rw-r--r--ports/esp32/machine_dac.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ports/esp32/machine_dac.c b/ports/esp32/machine_dac.c
index 02855fcf8..146ef60aa 100644
--- a/ports/esp32/machine_dac.c
+++ b/ports/esp32/machine_dac.c
@@ -43,8 +43,13 @@ typedef struct _mdac_obj_t {
} mdac_obj_t;
STATIC const mdac_obj_t mdac_obj[] = {
+ #if CONFIG_IDF_TARGET_ESP32
{{&machine_dac_type}, GPIO_NUM_25, DAC_CHANNEL_1},
{{&machine_dac_type}, GPIO_NUM_26, DAC_CHANNEL_2},
+ #else
+ {{&machine_dac_type}, GPIO_NUM_17, DAC_CHANNEL_1},
+ {{&machine_dac_type}, GPIO_NUM_18, DAC_CHANNEL_2},
+ #endif
};
STATIC mp_obj_t mdac_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw,