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.
This commit is contained in:
sommersoft 2017-12-14 12:02:43 -06:00 committed by Scott Shawcroft
parent 00bf60db28
commit 36ec29d4e8
2 changed files with 12 additions and 1 deletions

View File

@ -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
--------------------------------------------------------------------------------

View File

@ -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);