summaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)Author
2022-10-11py/py.mk: Make user-C-module handling self-contained in py.mk.Jim Mussared
Removes the need for the port to add anything to OBJS or SRC_QSTR. Also makes it possible for user-C-modules to differentiate between code that should be processed for QSTR vs other files (e.g. helpers and libraries). Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-11all: Use += rather than = everywhere for CFLAGS/LDFLAGS/LIBS.Jim Mussared
This avoids a surprise where an = can cancel out an earlier +=. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-01tools/mpremote: Add `mpremote mip install` to install packages.Jim Mussared
This supports the same package sources as the new `mip` tool. - micropython-lib (by name) - http(s) & github packages with json description - directly downloading a .py/.mpy file The version is specified with an optional `@version` on the end of the package name. The target dir, index, and mpy/no-mpy can be set through command line args. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-30top: Replace upip with mip everywhere.Jim Mussared
Updates all README.md and docs, and manifests to `require("mip")`. Also extend and improve the documentation on freezing and packaging. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-29docs/Makefile: Enable parallel compilation for Sphinx.Jim Mussared
This has a fairly dramatic (nearly 3x on a 6-core machine) speedup for docs compilation, with no impact on correctness. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-19py/persistentcode: Introduce .mpy sub-version.Jim Mussared
The intent is to allow us to make breaking changes to the native ABI (e.g. changes to dynruntime.h) without needing the bytecode version to increment. With this commit the two bits previously used for the feature flags (but now unused as of .mpy version 6) encode a sub-version. A bytecode-only .mpy file can be loaded as long as MPY_VERSION matches, but a native .mpy (i.e. one with an arch set) must also match MPY_SUB_VERSION. This allows 3 additional updates to the native ABI per bytecode revision. The sub-version is set to 1 because the previous commits that changed the layout of mp_obj_type_t have changed the native ABI. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> Signed-off-by: Damien George <damien@micropython.org>
2022-09-13mimxrt/machine_spi: Allow a setting of -1 for cs in the constructor.robert-hh
In that case, no Pin will be configured for the CS signal, even if it is internally still generated. That setting allows to use any pin for CS, which then must be controlled by the Python script. Also make the default cs=-1 to match other ports (software CS).
2022-09-09extmod/modbluetooth: Replace def_handle with end_handle in char IRQ.Jim Mussared
This is technically a breaking change, but: a) We need the end handle to do descriptor discovery properly. b) We have no possible use for the existing definition handle in the characteristic result IRQ. None of the methods can use it, and therefore no existing code should be using it in a way that changing it to a different integer value should break. Unfortunately NimBLE doesn't make it easy to get the end handle, so also implement a mechanism to use the following characteristic to calculate the previous characteristic's end handle. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-06drivers/display: Don't include tests by default.Damien George
The tests can be copied to the board if needed. Also update the docs to reflect this change. Signed-off-by: Damien George <damien@micropython.org>
2022-08-31docs/renesas-ra: Add pin drive keyword argument description.Takeo Takahashi
Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2022-08-31docs/library/machine.UART: Add docs for uart.flush() and uart.txdone().robert-hh
2022-08-31docs/library/machine.I2C: Add a note about I2C pull-up resistors.robert-hh
Quite regularly users complain about unexpected behavior of I2C, calling it a bug, when in fact the trouble is caused by missing pull-up resistors. So this commit adds a note to the documentation, in the slim hope that people will find and read it.
2022-08-30docs/templates/topindex.html: Update forum link.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-08-26docs/library/micropython: Fix spelling of compiler.Laurens Valk
Signed-off-by: Laurens Valk <laurens@pybricks.com>
2022-08-26docs/library: Fix nested rst styles not rendering.Laurens Valk
These can't be nested, so apply styling separately. Signed-off-by: Laurens Valk <laurens@pybricks.com>
2022-08-26docs/library/machine.UART: Add notes about UART init and deinit.Tomasz 'CeDeROM' CEDRO
* `init()` can be called multiple times to reconfigure UART. * After `deinit()` it is impossible to call `init()` again. Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2022-08-26docs/esp32: Update UART quickref on input-only pins.Tomasz 'CeDeROM' CEDRO
Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2022-08-26docs: Update CPython differences and improve the look of table layouts.Matt Trentini
Updated some of the CPython feature differences: - Updated status of some features. - Added CSS to fix table widths to 100% and word wrap. - Specified explicit table column ratios to improve layout appearance. - Added missing references to anchors. - Better consistency with use of formatting and case.
2022-08-26tools/mpremote: Print nicer errors for unsupported 'cp -r' arguments.Damien George
Also document support for 'cp :a :b'. Signed-off-by: Damien George <damien@micropython.org>
2022-08-26drivers/cc3000: Remove CC3000 WiFi driver files.Damien George
It's no longer used by any port. Signed-off-by: Damien George <damien@micropython.org>
2022-08-23rp2/machine_wdt: Check for the maximum timeout value of watchdog.robert-hh
The value will be checked for timeout <= 8388. Notes were added to the documentation.
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.