summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsommersoft <sommersoft@users.noreply.github.com>2017-12-14 12:02:43 -0600
committerScott Shawcroft <scott@tannewt.org>2017-12-14 10:02:43 -0800
commit36ec29d4e85b19487c868287f09d2492eecc0274 (patch)
tree9c94d031122c9f36a8b8944a8ca45bf7b96dbaf7
parent00bf60db284b417b9d361dfdb7d92c15686c9719 (diff)
Documentation Updates (mcu.delay() and Design Guide) (#481)
/docs/design_guide: added links to firmware build learning guides for SAMD21 & ESP8266. Changes were placed in the "Adding native modules" section, since that seemed to me the best place based on target audience. Updated documentation for `delay()` which fixes #243.
-rw-r--r--docs/design_guide.rst7
-rw-r--r--shared-bindings/microcontroller/__init__.c6
2 files changed, 12 insertions, 1 deletions
diff --git a/docs/design_guide.rst b/docs/design_guide.rst
index 7d20a8261..8d3de3d69 100644
--- a/docs/design_guide.rst
+++ b/docs/design_guide.rst
@@ -416,6 +416,13 @@ live in ``shared-module``. If it is port specific then it should live in ``commo
within the port's folder. In either case, the file and folder structure should
mimic the structure in ``shared-bindings``.
+To test your native modules or core enhancements, follow these Adafruit Learning Guides
+for building local firmware to flash onto your device(s):
+
+`SAMD21 - Build Firmware Learning Guide <https://learn.adafruit.com/micropython-for-samd21/build-firmware>`_
+
+`ESP8266 - Build Firmware Learning Guide <https://learn.adafruit.com/building-and-running-micropython-on-the-esp8266/overview>`_
+
MicroPython compatibility
--------------------------------------------------------------------------------
diff --git a/shared-bindings/microcontroller/__init__.c b/shared-bindings/microcontroller/__init__.c
index d2567bd65..58ed876c2 100644
--- a/shared-bindings/microcontroller/__init__.c
+++ b/shared-bindings/microcontroller/__init__.c
@@ -71,7 +71,11 @@
//| .. method:: delay_us(delay)
//|
//| Dedicated delay method used for very short delays. **Do not** do long delays
-//| because it will stall any concurrent code.
+//| because this stops all other functions from completing. Think of this as an empty
+//| ``while`` loop that runs for the specified ``(delay)`` time. If you have other
+//| code or peripherals (e.g audio recording) that require specific timing or
+//| processing while you are waiting, explore a different avenue such as using
+//| `time.sleep()`.
//|
STATIC mp_obj_t mcu_delay_us(mp_obj_t delay_obj) {
uint32_t delay = mp_obj_get_int(delay_obj);