summaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)Author
2022-08-19extmod/modframebuf: Add polygon drawing methods.Mat Booth
Add method for drawing polygons. For non-filled polygons, uses the existing line-drawing code to render arbitrary polygons using the given coords list, at the given x,y position, in the given colour. For filled polygons, arbitrary closed polygons are rendered using a fast point-in-polygon algorithm to determine where the edges of the polygon lie on each pixel row. Tests and documentation updates are also included. Signed-off-by: Mat Booth <mat.booth@gmail.com>
2022-08-19extmod/modframebuf: Add ellipse drawing method.Peter Hinch
2022-08-19extmod/modframebuf: Add fill argument to rect().Jim Mussared
We plan to add `ellipse` and `poly` methods, but rather than having to implement a `fill_xyz` version of each, we can make them take an optional fill argument. This commit add this to `rect` as a starting point. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-08-18tools/mpremote: Add "edit" command.Jim Mussared
This allows a remote file to be edited locally by copying it over, running the local editor, then copying it back. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-08-18tools/pyboard.py: Add "touch" filesystem command.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-08-18tools/mpremote: Allow + terminator for fs commands.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-08-17docs/esp32: Fix string quoting consistency in SDCard mount example.David Peake
It appears that strings in the documentation are typically single quoted.
2022-08-12extmod/uasyncio: Add clear method to ThreadSafeFlag.Ned Konz
This is useful in situations where the ThreadSafeFlag is reused and needs to be cleared of any previous, unwanted event. For example, clear the flag at the start of an operation, trigger the operation (eg an I2C write), then (a)wait for an external event to set the flag (eg a pin IRQ). Further events may trigger the flag again but these are unwanted and should be cleared before the next cycle starts.
2022-08-11docs/library/rp2: Fix pull_thresh docs to use pull instead of push.Nathan Hendler
2022-08-11docs: Update links for Arm GCC toolchain.David Lechner
The separate A and RM toolchains have been discontinued and replaced by a single toolchain. This updates the links to the RM toolchain to the new toolchain. Signed-off-by: David Lechner <david@pybricks.com>
2022-07-29docs/library/pyb.Timer: Document how to use BKIN pin with example.chrismas9
Document how to connect the Timer block BRK_IN to a physical Pin alternate function. Add an example of PWM Motor drive using complementary outputs with dead time and break input to kill the PWM and generate a callback. Signed-off-by: Chris Mason <c.mason@inchipdesign.com.au>
2022-07-29docs/library/pyb.Pin: Add Pin.ALT constant.chrismas9
Some Pin alternate functions are inputs, for example, timer capture and break inputs. In Pyb.Pin the only way to set alt mode is with Pin.AF_PP or Pin.AF_OD. It is not intuitive to use an output mode to configure an input. Pin.ALT is used in the machine.Pin class and works in pyb.Pin. The examples are changed to use Pin.ALT because TIM2_CH3 can be a capture input or pulse output. Signed-off-by: Chris Mason <c.mason@inchipdesign.com.au>
2022-07-29docs/library/pyb.Pin: Fix out-of-context paragraphs, and AF_PP typo.chrismas9
Remove out of context callback paragraph, it was part of the wipy docs. And move the paragraph about PULL_UP/PULL_DOWN resistor values to within the init() method docs. Also fix pull-pull -> push-pull. Signed-off-by: Chris Mason <c.mason@inchipdesign.com.au>
2022-07-29docs/library/time: Provide more info about which epoch is used.Peter Hinch
Some embedded targets use 1970 epoch.
2022-07-23docs/library/neopixel: Add note that neopixel is included in rp2 builds.Andrew Scheller
2022-07-20extmod/modussl_mbedtls: Implement cert_reqs and cadata arguments.Carlosgg
Add cert_reqs and cadata keyword-args to ssl.wrap_socket() and ssl.CERT_NONE, ssl.CERT_OPTIONAL, ssl.CERT_REQUIRED constants to allow certificate validation. CPython doesn't accept cadata in ssl.wrap_socket(), but it does in SSLContext.load_verify_locations(), so we use this name to at least match the same name in load_verify_locations(). Add docs for these new arguments, as well as docs for the existing server_hostname argument which is important for certificate validation. Tests are added as well. Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>
2022-07-18shared/readline: Use MP_REGISTER_ROOT_POINTER().David Lechner
This uses MP_REGISTER_ROOT_POINTER() to register the readline_history root pointer array used by shared/readline.c and removes the registration from all mpconfigport.h files. This also required adding a new MICROPY_READLINE_HISTORY_SIZE config option since not all ports used the same sized array. Signed-off-by: David Lechner <david@pybricks.com>
2022-07-05esp32,esp8266: Rename WLAN dhcp_hostname config to hostname.IhorNehrutsa
But retain old name for backwards compatibility.
2022-06-24docs/library/bluetooth: Add link to aioble.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-06-24extmod/uasyncio: Implement stream read(-1) to read all data up to EOF.Damien George
Fixes issue #6355. Signed-off-by: Damien George <damien@micropython.org>
2022-06-23esp32/modesp32: Add wake_on_ulp() so ULP can wake CPU from deepsleep.Christian Walther
Add esp32.wake_on_ulp() to give access to esp_sleep_enable_ulp_wakeup(), which is needed to allow the ULP co-processor to wake the main CPU from deep sleep.
2022-06-21docs/library/uasyncio: Consistently use "uasyncio" instead of "asyncio".Luiz Brandao
2022-06-21docs/library/machine: Add note on interrupts being critical to system.Patrick Joy
2022-06-21docs: Set LaTeX engine to XeLaTeX for PDF generation.Stewart C. Russell
Also added to suggested packages list for PDF build. See comment in Sphinx project for (some) details: https://github.com/sphinx-doc/sphinx/pull/5693#pullrequestreview-180444650
2022-06-21docs/library: Remove unnecessary "pyb." prefix on class names.Damien George
Otherwise these classes are refered to with a double prefix, like pyb.pyb.ADC. Signed-off-by: Damien George <damien@micropython.org>
2022-06-21docs/library/pyb.Timer: Document `brk` argument and its constants.Howard Lovatt
2022-06-21extmod/modbtree: Use buffer protocol for keys/values.David Lechner
This changes the btree implementation to use the buffer protocol for reading key/values in all methods. `str` and `bytes` objects are not the only bytes-like objects that could be used. Documentation and tests are also updated. Addresses issue #8748. Signed-off-by: David Lechner <david@pybricks.com>
2022-06-21extmod/extmod.mk: Separate out extmod file list from py.mk to extmod.mk.David Lechner
This separates extmod source files from `py.mk`. Previously, `py.mk` assumed that every consumer of the py/ directory also wanted to include extmod/. However, this is not the case. For example, building mpy-cross uses py/ but doesn't need extmod/. This commit moves all extmod-specific items from `py.mk` to `extmod.mk` and explicitly includes `extmod.mk` in ports that use it. Signed-off-by: David Lechner <david@pybricks.com>
2022-06-17docs: Update to use new WLAN argument names for ssid/security/key.iabdalkader
Addresses issue #8083.
2022-06-17zephyr: Upgrade to Zephyr v3.1.0.Maureen Helm
Updates the Zephyr port build instructions and CI to use the latest Zephyr release tag. Tested on frdm_k64f. Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-06-17all: Bump version to 1.19.1.v1.19.1Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-16all: Bump version to 1.19.v1.19Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-14docs: Update Raspberry Pi URLs from .org to .com.Andrew Scheller
2022-06-10docs/reference/mpyfiles: Update .mpy description to match latest format.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-07all: Rename MICROPY_PY_WIZNET5K to MICROPY_PY_NETWORK_WIZNET5K.Damien George
To match MICROPY_PY_NETWORK_CYW43 and MICROPY_PY_NETWORK_NINAW10. Signed-off-by: Damien George <damien@micropython.org>
2022-06-02all: Remove third argument to MP_REGISTER_MODULE.Damien George
It's no longer needed because this macro is now processed after preprocessing the source code via cpp (in the qstr extraction stage), which means unused MP_REGISTER_MODULE's are filtered out by the preprocessor. Signed-off-by: Damien George <damien@micropython.org>
2022-05-27docs/reference/manifest: Add link to details about opt-level for freeze.Andrew Leech
2022-05-27docs/mimxrt: Move the pinout tables to a separate document.robert-hh
This shortens the quickref. Also change the note about the hardware SPI frequeny limits.
2022-05-27docs/mimxrt: Add i.MX RT1015 to general.rst, and a few clarifications.robert-hh
2022-05-24unix: Implement `-X realtime` command-line option on macOS.David Lechner
This adds a new command line option to the unix port `-X realtime` to enable realtime priority on threads. This enables high precision timers for applications that need more accurate timers. Related docs: https://developer.apple.com/library/archive/technotes/tn2169/_index.html Fixes issue #8621. Signed-off-by: David Lechner <david@pybricks.com>
2022-05-23py/dynruntime.mk: Add basic support for armv6m architecture.Damien George
The examples/natmod features0 and features1 examples now build and run on ARMv6-M platforms. More complicated examples are not yet supported because the compiler emits references to built-in functions like __aeabi_uidiv. Signed-off-by: Damien George <damien@micropython.org>
2022-05-18py/parse: Allow all constant objects to be used in "X = const(o)".Damien George
Now that constant tuples are supported in the parser, eg (1, True, "str"), it's a small step to allow anything that is a constant to be used with the pattern: from micropython import const X = const(obj) This commit makes the required changes to allow the following types of constants: from micropython import const _INT = const(123) _FLOAT = const(1.2) _COMPLEX = const(3.4j) _STR = const("str") _BYTES = const(b"bytes") _TUPLE = const((_INT, _STR, _BYTES)) _TUPLE2 = const((None, False, True, ..., (), _TUPLE)) Prior to this, only integers could be used in const(...). Signed-off-by: Damien George <damien@micropython.org>
2022-05-17docs/reference/mpyfiles: Remove docs about mpy flags and qstr win size.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-05-03docs/renesas-ra: Remove unused image files.Takeo Takahashi
Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2022-04-29docs: Update files for renesas-ra port.Takeo Takahashi
Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2022-04-29docs/renesas-ra: Add renesas-ra docs files.Takeo Takahashi
Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2022-04-28py/modsys: Introduce sys.implementation._machine constant.Damien George
This contains a string useful for identifying the underlying machine. This string is kept consistent with the second part of the REPL banner via the new config option MICROPY_BANNER_MACHINE. This makes os.uname() more or less redundant, as all the information in os.uname() is now available in the sys module. Signed-off-by: Damien George <damien@micropython.org>
2022-04-28py/modsys: Rename sys.implementation.mpy to sys.implementation._mpy.Damien George
Per CPython docs, non-standard attributes must begin with an underscore. Signed-off-by: Damien George <damien@micropython.org>
2022-04-22docs/library/network.WLAN: Add "txpower" to list of known WLAN configs.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-04-15docs/reference: Update constrained docs now that tuples can be const.Damien George
Signed-off-by: Damien George <damien@micropython.org>