Skip to content

Commit 36ec29d

Browse files
sommersofttannewt
authored andcommitted
Documentation Updates (mcu.delay() and Design Guide) (adafruit#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 adafruit#243.
1 parent 00bf60d commit 36ec29d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

docs/design_guide.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,13 @@ live in ``shared-module``. If it is port specific then it should live in ``commo
416416
within the port's folder. In either case, the file and folder structure should
417417
mimic the structure in ``shared-bindings``.
418418

419+
To test your native modules or core enhancements, follow these Adafruit Learning Guides
420+
for building local firmware to flash onto your device(s):
421+
422+
`SAMD21 - Build Firmware Learning Guide <https://learn.adafruit.com/micropython-for-samd21/build-firmware>`_
423+
424+
`ESP8266 - Build Firmware Learning Guide <https://learn.adafruit.com/building-and-running-micropython-on-the-esp8266/overview>`_
425+
419426
MicroPython compatibility
420427
--------------------------------------------------------------------------------
421428

shared-bindings/microcontroller/__init__.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@
7171
//| .. method:: delay_us(delay)
7272
//|
7373
//| Dedicated delay method used for very short delays. **Do not** do long delays
74-
//| because it will stall any concurrent code.
74+
//| because this stops all other functions from completing. Think of this as an empty
75+
//| ``while`` loop that runs for the specified ``(delay)`` time. If you have other
76+
//| code or peripherals (e.g audio recording) that require specific timing or
77+
//| processing while you are waiting, explore a different avenue such as using
78+
//| `time.sleep()`.
7579
//|
7680
STATIC mp_obj_t mcu_delay_us(mp_obj_t delay_obj) {
7781
uint32_t delay = mp_obj_get_int(delay_obj);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy