Commit Graph

15 Commits

Author SHA1 Message Date
Scott Shawcroft 4e8de3c554
Swap sphinx to autoapi and the inline stubs 2020-05-12 17:28:24 -07:00
dherrada e31e9eeaa1
Did math, microcontroller, and multiterminal 2020-05-07 15:59:52 -04:00
Dan Halbert 817b5be320 rename routines to be clearer; fix wiznet arg types 2020-03-05 16:35:31 -05:00
Dan Halbert b6206406de new pin validation routines; don't use mp_const_none if NULL will do 2020-02-28 23:43:04 -05:00
Scott Shawcroft cfe24b8532
Improve rST consistency for rst2pyi use 2019-05-30 19:02:47 -07:00
Scott Shawcroft 96ebf5bc3f
Two fixes and translate more strings.
* Fix finding translations with escaped characters.
* Add back \r to translations since its needed by screen.
2018-08-09 13:29:30 -07:00
Scott Shawcroft 933add6cd8
Support internationalisation. 2018-08-07 14:58:57 -07:00
Scott Shawcroft 168aa394db
Move pin struct to the peripherals library.
Its slimmed down by removing the qstr and bit packing TCC info.

The trinket m0 build actually grows by 20 bytes. The arduino zero
build shrinks by 188 bytes.
2018-08-02 13:59:05 -07:00
Scott Shawcroft 0bf999f52a
Use more mp_raise_* to save 28 bytes code size. 2018-07-31 13:50:48 -07:00
Scott Shawcroft 4c05086661 Check that neopixel write is actually given a DigitalInOut. 2017-02-22 20:10:10 +01:00
Scott Shawcroft d67968e3c3 Add print support to Pin. #83 #76 2017-02-19 14:23:29 +01:00
Scott Shawcroft 3dda38c8ab Fix pin free check to ignore None objects. Fixes #89 2017-02-19 12:59:31 +01:00
Scott Shawcroft 0ae344841f atmel-samd & esp8266: Make sure pins are not already in use.
This prevents corrupting previous functional objects by stealing their pins
out from under them. It prevents this by ensuring that pins are in default
state before claiming them. It also verifies pins are released correctly and
reset on soft reset.

Fixes #4, instantiating a second class will fail.
Fixes #29, pins are now reset too.
2016-12-07 15:21:14 -08:00
Scott Shawcroft 4933fa1c27 shared-bindings: Ensure pin objects are actually pins.
Fixes #12
2016-11-29 15:50:01 -08:00
Scott Shawcroft ccbb5e84f9 This introduces an alternative hardware API called nativeio structured around different functions that are typically accelerated by native hardware. Its not meant to reflect the structure of the hardware.
Docs are here: http://tannewt-micropython.readthedocs.io/en/microcontroller/

It differs from upstream's machine in the following ways:

* Python API is identical across ports due to code structure. (Lives in shared-bindings)
* Focuses on abstracting common functionality (AnalogIn) and not representing structure (ADC).
* Documentation lives with code making it easy to ensure they match.
* Pin is split into references (board.D13 and microcontroller.pin.PA17) and functionality (DigitalInOut).
* All nativeio classes claim underlying hardware resources when inited on construction, support Context Managers (aka with statements) and have deinit methods which release the claimed hardware.
* All constructors take pin references rather than peripheral ids. Its up to the implementation to find hardware or throw and exception.
2016-11-21 14:11:52 -08:00