summaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorroot <siehputz@gmail.com>2020-11-10 12:45:39 -0600
committerroot <siehputz@gmail.com>2020-11-10 12:45:39 -0600
commitfe7ed999393e369243319c48453cc2f7add3e7f0 (patch)
tree0638083a89cb59d3df9363bd54b0fc83162f2123 /ports
parent44425b8d94d25709cb874b35f74a31da95bbfa38 (diff)
Split out extern declare to ports/esp32s2/supervisor/esp_port.h
Diffstat (limited to 'ports')
-rw-r--r--ports/esp32s2/supervisor/esp_port.h35
-rw-r--r--ports/esp32s2/supervisor/port.c3
2 files changed, 37 insertions, 1 deletions
diff --git a/ports/esp32s2/supervisor/esp_port.h b/ports/esp32s2/supervisor/esp_port.h
new file mode 100644
index 000000000..1164666cd
--- /dev/null
+++ b/ports/esp32s2/supervisor/esp_port.h
@@ -0,0 +1,35 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Lucian Copeland for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef MICROPY_INCLUDED_ESP32S2_SUPERVISOR_PORT_H
+#define MICROPY_INCLUDED_ESP32S2_SUPERVISOR_PORT_H
+
+#include "freertos/FreeRTOS.h"
+#include "freertos/task.h"
+
+extern TaskHandle_t sleeping_circuitpython_task;
+
+#endif // MICROPY_INCLUDED_ESP32S2_SUPERVISOR_PORT_H
diff --git a/ports/esp32s2/supervisor/port.c b/ports/esp32s2/supervisor/port.c
index 4b9a4f7ef..0ac2236d3 100644
--- a/ports/esp32s2/supervisor/port.c
+++ b/ports/esp32s2/supervisor/port.c
@@ -31,6 +31,7 @@
#include "boards/board.h"
#include "modules/module.h"
#include "py/runtime.h"
+#include "supervisor/esp_port.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
@@ -55,7 +56,7 @@
uint32_t* heap;
uint32_t heap_size;
-extern TaskHandle_t sleeping_circuitpython_task;
+
STATIC esp_timer_handle_t _tick_timer;
extern void esp_restart(void) NORETURN;