aboutsummaryrefslogtreecommitdiff
path: root/ports/esp32/machine_touchpad.c
diff options
context:
space:
mode:
authorDamien George2021-02-18 21:24:34 +1100
committerDamien George2021-04-15 10:31:06 +1000
commit66a86a061530eeee51191c3c667e9bc3cfcfda40 (patch)
treee2e0e6d63f4dc16d47a7f0a855dd2b43f07ebc5b /ports/esp32/machine_touchpad.c
parent8459f538eb45fd8e1e4d614298449cf18de84d75 (diff)
esp32: Add initial support for ESP32S2 SoCs.
Builds against IDF v4.3-beta2. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/esp32/machine_touchpad.c')
-rw-r--r--ports/esp32/machine_touchpad.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/ports/esp32/machine_touchpad.c b/ports/esp32/machine_touchpad.c
index 44efac375..335157b15 100644
--- a/ports/esp32/machine_touchpad.c
+++ b/ports/esp32/machine_touchpad.c
@@ -24,18 +24,15 @@
* THE SOFTWARE.
*/
+#include "py/runtime.h"
+#include "py/mphal.h"
+#include "modmachine.h"
-#include <stdio.h>
-
-#include "esp_log.h"
+#if CONFIG_IDF_TARGET_ESP32
#include "driver/gpio.h"
#include "driver/touch_pad.h"
-#include "py/runtime.h"
-#include "py/mphal.h"
-#include "modmachine.h"
-
typedef struct _mtp_obj_t {
mp_obj_base_t base;
gpio_num_t gpio_id;
@@ -120,3 +117,5 @@ const mp_obj_type_t machine_touchpad_type = {
.make_new = mtp_make_new,
.locals_dict = (mp_obj_t)&mtp_locals_dict,
};
+
+#endif // CONFIG_IDF_TARGET_ESP32