summaryrefslogtreecommitdiff
path: root/ports/esp32s2/modules
diff options
context:
space:
mode:
authorDavePutz <dwputz@gmail.com>2020-06-08 10:42:45 -0500
committerGitHub <noreply@github.com>2020-06-08 10:42:45 -0500
commitef87cc3ed389700f7d32d8a74b2e8499863f1a74 (patch)
tree1bcae9dd5dac92169db4435421aa1a4510a449ce /ports/esp32s2/modules
parent1f40f9e04ff9be0eb82f56014bde5749be604ad9 (diff)
parent004d6441842981994d20027ab7e3248339524bec (diff)
Merge pull request #6 from adafruit/master
updating from adafruit
Diffstat (limited to 'ports/esp32s2/modules')
-rw-r--r--ports/esp32s2/modules/module.h35
-rw-r--r--ports/esp32s2/modules/none.c28
-rw-r--r--ports/esp32s2/modules/wroom.c37
-rw-r--r--ports/esp32s2/modules/wrover.c38
4 files changed, 138 insertions, 0 deletions
diff --git a/ports/esp32s2/modules/module.h b/ports/esp32s2/modules/module.h
new file mode 100644
index 000000000..6c40e30e0
--- /dev/null
+++ b/ports/esp32s2/modules/module.h
@@ -0,0 +1,35 @@
+/*
+ * This file is part of the Micro Python project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Scott Shawcroft 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_MODULES_MODULE_H
+#define MICROPY_INCLUDED_ESP32S2_MODULES_MODULE_H
+
+#include "shared-bindings/microcontroller/Pin.h"
+
+void never_reset_module_internal_pins(void);
+
+#endif // MICROPY_INCLUDED_ESP32S2_MODULES_MODULE_H
diff --git a/ports/esp32s2/modules/none.c b/ports/esp32s2/modules/none.c
new file mode 100644
index 000000000..9b5433bd9
--- /dev/null
+++ b/ports/esp32s2/modules/none.c
@@ -0,0 +1,28 @@
+/*
+ * This file is part of the Micro Python project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Scott Shawcroft 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.
+ */
+
+void never_reset_module_internal_pins(void) {
+}
diff --git a/ports/esp32s2/modules/wroom.c b/ports/esp32s2/modules/wroom.c
new file mode 100644
index 000000000..16c586118
--- /dev/null
+++ b/ports/esp32s2/modules/wroom.c
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the Micro Python project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Scott Shawcroft 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.
+ */
+
+#include "modules/module.h"
+
+void never_reset_module_internal_pins(void) {
+ // SPI Flash
+ never_reset_pin(&pin_GPIO27);
+ never_reset_pin(&pin_GPIO28);
+ never_reset_pin(&pin_GPIO29);
+ never_reset_pin(&pin_GPIO30);
+ never_reset_pin(&pin_GPIO31);
+ never_reset_pin(&pin_GPIO32);
+}
diff --git a/ports/esp32s2/modules/wrover.c b/ports/esp32s2/modules/wrover.c
new file mode 100644
index 000000000..d589a8fd4
--- /dev/null
+++ b/ports/esp32s2/modules/wrover.c
@@ -0,0 +1,38 @@
+/*
+ * This file is part of the Micro Python project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Scott Shawcroft 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.
+ */
+
+#include "modules/module.h"
+
+void never_reset_module_internal_pins(void) {
+ // SPI Flash and RAM
+ never_reset_pin(&pin_GPIO26);
+ never_reset_pin(&pin_GPIO27);
+ never_reset_pin(&pin_GPIO28);
+ never_reset_pin(&pin_GPIO29);
+ never_reset_pin(&pin_GPIO30);
+ never_reset_pin(&pin_GPIO31);
+ never_reset_pin(&pin_GPIO32);
+}