summaryrefslogtreecommitdiff
path: root/shared-bindings/microcontroller
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 /shared-bindings/microcontroller
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.
Diffstat (limited to 'shared-bindings/microcontroller')
-rw-r--r--shared-bindings/microcontroller/__init__.c6
1 files changed, 5 insertions, 1 deletions
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);