Commit Graph

78 Commits

Author SHA1 Message Date
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
Thea Flowers 6782948751
Note behavior in documentation 2019-10-25 10:56:41 -07:00
Scott Shawcroft a35d9b469d
Refactor deinit check to reduce code size. 2019-06-12 11:36:43 -07:00
Dan Halbert 4fc189b60c Merge latest 4.0.x fixes into master 2019-06-11 16:16:29 -04:00
Scott Shawcroft cfe24b8532
Improve rST consistency for rst2pyi use 2019-05-30 19:02:47 -07:00
Jason Pecor a9a2227167
Removed warning box regarding SAMD21 builds
The support matrix shows that pulseio is supported for all SAMD21/SAMD51 variants. Removing warning to avoid confusion.
2019-05-27 14:08:19 -05:00
Dan Halbert 97140e6a62 wrong arg type for PWMOut variable_frequency 2019-03-12 21:28:30 -04:00
Scott Shawcroft c17f147be9
A variety of displayio improvements
This changes a number of things in displayio:
* Introduces BuiltinFont and Glyph so the built in font can be used by libraries. For boards with
  a font it is available as board.TERMINAL_FONT. Fixes #1172
* Remove _load_row from Bitmap in favor of bitmap[] access. Index can be x/y tuple or overall index. Fixes #1191
* Add width and height properties to Bitmap.
* Add insert and [] access to Group. Fixes #1518
* Add index param to pop on Group.
* Terminal no longer takes unicode character info. It takes a BuiltinFont instead.
* Fix Terminal's handling of [###D vt100 commands used when up arrowing into repl history.
* Add x and y positions to Group plus scale as well.
* Add bitmap accessor for BuiltinFont
2019-02-11 20:55:05 -08:00
Scott Shawcroft 69bc5e189b
Rudamentary backlight support 2019-01-31 11:42:14 -08:00
Scott Shawcroft 747f2cfe26
Add subclass support to displayio.
Also, swap make_news to accept a kwarg map and refine param checking.

Fixes #1237
2019-01-14 17:29:19 -08:00
Dan Halbert 2262efc311 PulseOut working 2018-10-16 11:05:02 -04:00
Dan Halbert 91a88cf568 Allow variable freq PWMOut; use multiple channels if same freq 2018-10-09 20:52:55 -04:00
Scott Shawcroft 933add6cd8
Support internationalisation. 2018-08-07 14:58:57 -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 2fbab8067a Prevent freezing USB during high frequency PulseIn.
We now track the last time the background task ran and bail on the
PulseIn if it starves the background work. In practice, this
happens after the numbers from pulsein are no longer accurate.

This also adjusts interrupt priorities so most are the lowest level
except for the tick and USB interrupts.

Fixes #516 and #876
2018-06-08 12:56:32 -07:00
Scott Shawcroft 15db02664d Clarify style of attribute comments in the Design Guide.
And update the core attributes to match the style.
2018-02-07 13:08:42 -08:00
Scott Shawcroft d2ddf36c1d shared-bindings: Use unary_op type. 2017-10-25 10:52:03 -07:00
Dan Halbert c478c10923 Do not allow a *io object to be used after deinit().
Fixes #278, #277, #276, #275.
2017-10-03 12:07:17 -07:00
Dan Halbert ef61b5ecb5 Initial merge of micropython v1.9.2 into circuitpython 2.0.0 (in development) master.
cpx build compiles and loads and works in repl; test suite not run yet
esp8266 not tested yet
2017-08-25 22:17:07 -04:00
Scott Shawcroft 42156484ae shared-bindings/atmel-samd: Fix and improve trigger duration timing on PulseIn.resume. 2017-08-10 11:55:34 -07:00
brentru 48375ba954 fixed naming on pulseIn example for docs 2017-07-27 19:15:51 -07:00
Scott Shawcroft 714521a4c7 shared-bindings: Update docs to remove with statements from examples but add more detail to the design guide about their use. 2017-06-07 14:39:12 -07:00
Scott Shawcroft 2ecb9a3dbf docs: Fix header lines that are too short. 2017-06-07 11:58:04 -07:00
Scott Shawcroft c8dc091288 shared-bindings: Fix duty_cycle parameter description and error message. 2017-06-06 16:23:06 -07:00
Scott Shawcroft ef1a4847b3 shared-bindings: Correct PulseIn.resume to match docs. Fixes #125 2017-05-08 11:14:23 -07:00
Scott Shawcroft b653c3c8fc Correct PulseOut example code 2017-04-13 17:52:13 -07:00
Scott Shawcroft 4a4f29b8f9 atmel-samd: Rework status LED implementation
* Track status pin use by user code separately so it can take over the pins and then give them back.
* Switch to hardware SPI for APA102 on Gemma and Trinket.
* Merge microcontroller/types.h into microcontroller/Pin.h to better match approach going forwards.
2017-04-12 15:24:50 -07:00
Scott Shawcroft f28f8ba568 Split up nativeio.
This was done to allow greatly granularity when deciding what functionality
is built into each board's build. For example, this way pulseio can be
omitted to allow for something else such as touchio.
2017-04-10 13:32:19 -07:00