summaryrefslogtreecommitdiff
path: root/shared-bindings/supervisor/Runtime.c
diff options
context:
space:
mode:
authorBenjamin Shockley <benjaminshockley@hotmail.com>2020-08-20 13:48:15 -0500
committerGitHub <noreply@github.com>2020-08-20 13:48:15 -0500
commit0084f0af24e4e219bc040c52ee723959423de6e2 (patch)
tree1aebdb362f08bf6417caa87836e3e4e739afc964 /shared-bindings/supervisor/Runtime.c
parent9aebe2f1efc99871fcf283c304e3a8700050d736 (diff)
parent4d7b9cde33934a44c4c905a49d2f831339fc8bd2 (diff)
Merge pull request #2 from adafruit/master
Master
Diffstat (limited to 'shared-bindings/supervisor/Runtime.c')
-rwxr-xr-xshared-bindings/supervisor/Runtime.c43
1 files changed, 17 insertions, 26 deletions
diff --git a/shared-bindings/supervisor/Runtime.c b/shared-bindings/supervisor/Runtime.c
index 5ba2198e1..a420d5b80 100755
--- a/shared-bindings/supervisor/Runtime.c
+++ b/shared-bindings/supervisor/Runtime.c
@@ -29,38 +29,30 @@
#include "shared-bindings/supervisor/Runtime.h"
//TODO: add USB, REPL to description once they're operational
-//| .. currentmodule:: supervisor
+//| class Runtime:
+//| """Current status of runtime objects.
//|
-//| :class:`Runtime` --- Supervisor Runtime information
-//| ----------------------------------------------------
+//| Usage::
//|
-//| Get current status of runtime objects.
-//|
-//| Usage::
-//|
-//| import supervisor
-//| if supervisor.runtime.serial_connected:
-//| print("Hello World!")
+//| import supervisor
+//| if supervisor.runtime.serial_connected:
+//| print("Hello World!")"""
//|
-//| .. class:: Runtime()
-//|
-//| You cannot create an instance of `supervisor.Runtime`.
-//| Use `supervisor.runtime` to access the sole instance available.
+//| def __init__(self, ):
+//| """You cannot create an instance of `supervisor.Runtime`.
+//| Use `supervisor.runtime` to access the sole instance available."""
+//| ...
//|
-//| .. attribute:: runtime.serial_connected
-//|
-//| Returns the USB serial communication status (read-only).
+//| serial_connected: bool = ...
+//| """Returns the USB serial communication status (read-only).
//|
//| .. note::
//|
//| SAMD: Will return ``True`` if the USB serial connection
//| has been established at any point. Will not reset if
-//| USB is disconnected but power remains (e.g. battery connected)
-//|
-//| Feather52 (nRF52832): Currently returns ``True`` regardless
-//| of USB connection status.
+//| USB is disconnected but power remains (e.g. battery connected)"""
//|
STATIC mp_obj_t supervisor_get_serial_connected(mp_obj_t self){
@@ -81,11 +73,10 @@ const mp_obj_property_t supervisor_serial_connected_obj = {
};
-//| .. attribute:: runtime.serial_bytes_available
-//|
-//| Returns the whether any bytes are available to read
-//| on the USB serial input. Allows for polling to see whether
-//| to call the built-in input() or wait. (read-only)
+//| serial_bytes_available: int = ...
+//| """Returns the whether any bytes are available to read
+//| on the USB serial input. Allows for polling to see whether
+//| to call the built-in input() or wait. (read-only)"""
//|
STATIC mp_obj_t supervisor_get_serial_bytes_available(mp_obj_t self){
if (!common_hal_get_serial_bytes_available()) {