summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2020-12-01 20:01:14 -0500
committerDan Halbert <halbert@halwitz.org>2020-12-01 20:01:14 -0500
commit8b7c23c1ee5d3fbfbda9116d6689e99f44e3b95a (patch)
tree52d4423b7bc48524d609abc6f2c7391c41fb8009 /py
parent28d9e9186e6a9a153217535bd2d9f144672846bb (diff)
address review comments
Diffstat (limited to 'py')
-rw-r--r--py/obj.h4
-rw-r--r--py/objexcept.c3
-rw-r--r--py/reload.c22
-rw-r--r--py/reload.h22
4 files changed, 45 insertions, 6 deletions
diff --git a/py/obj.h b/py/obj.h
index e055c9750..066562cc4 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -640,6 +640,10 @@ extern const mp_obj_type_t mp_type_UnicodeError;
extern const mp_obj_type_t mp_type_ValueError;
extern const mp_obj_type_t mp_type_ViperTypeError;
extern const mp_obj_type_t mp_type_ZeroDivisionError;
+#if CIRCUITPY_ALARM
+extern const mp_obj_type_t mp_type_DeepSleepRequest;
+#endif
+
// Constant objects, globally accessible
// The macros are for convenience only
diff --git a/py/objexcept.c b/py/objexcept.c
index 01ba6da9c..afefee2ca 100644
--- a/py/objexcept.c
+++ b/py/objexcept.c
@@ -319,6 +319,9 @@ MP_DEFINE_EXCEPTION(Exception, BaseException)
MP_DEFINE_EXCEPTION(UnicodeError, ValueError)
//TODO: Implement more UnicodeError subclasses which take arguments
#endif
+#if CIRCUITPY_ALARM
+ MP_DEFINE_EXCEPTION(DeepSleepRequest, BaseException)
+#endif
MP_DEFINE_EXCEPTION(MpyError, ValueError)
/*
MP_DEFINE_EXCEPTION(Warning, Exception)
diff --git a/py/reload.c b/py/reload.c
index 95305f2c9..f9f8a590a 100644
--- a/py/reload.c
+++ b/py/reload.c
@@ -1,6 +1,22 @@
-//
-// Created by Roy Hooper on 2018-05-14.
-//
+ /*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2018 by Roy Hooper
+ * 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 "reload.h"
#include "py/mpstate.h"
diff --git a/py/reload.h b/py/reload.h
index 72e84e5ca..3e8928a32 100644
--- a/py/reload.h
+++ b/py/reload.h
@@ -1,6 +1,22 @@
-//
-// Created by Roy Hooper on 2018-05-14.
-//
+ /*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2018 by Roy Hooper
+ * 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 CIRCUITPYTHON_RELOAD_H
#define CIRCUITPYTHON_RELOAD_H