Commit Graph

1578 Commits

Author SHA1 Message Date
Kevin Matocha 7b6d805580 Add Optional[int] to docs string 2020-09-01 15:40:55 -05:00
Kevin Matocha 649a955a74 Modified docs to try to pass sphinx build 2020-09-01 15:02:37 -05:00
Kevin Matocha c6529daac5 Added some backticks to clarify the docs 2020-09-01 14:44:32 -05:00
Kevin Matocha f5015e4485 Add hanging tab to doc 2020-09-01 14:36:43 -05:00
Kevin Matocha e14de38528 Revise .refresh input default value for target_frames_per_second to None 2020-09-01 13:57:19 -05:00
Dan Halbert 4e3cb55ce7 share more of _bleio dict; fix one doc error 2020-09-01 12:41:58 -04:00
Kevin Matocha 8be862e644 Remove trailing whitespace 2020-09-01 10:26:48 -05:00
Kevin Matocha c4b1db006f delete unnecessary comment 2020-09-01 09:38:57 -05:00
Kevin Matocha fc513956be Update refresh to force immediate redraw with display.refresh() or display.refresh(target_frames_per_second=None), even with auto_refresh=False 2020-09-01 09:36:29 -05:00
Dan Halbert f5a5fc4c84 Fix stub; mismatched triple quotes 2020-08-30 14:59:03 -04:00
Dan Halbert 6dbd369272 merge from upstream 2020-08-30 14:39:03 -04:00
Dan Halbert b27d511251 address review; use constructor for HCI Adapter 2020-08-30 14:06:48 -04:00
Scott Shawcroft 46dc133d04
Fix stub and doc builds 2020-08-26 17:18:16 -07:00
Scott Shawcroft 8b71e26abd
Merge remote-tracking branch 'adafruit/main' into native_wifi 2020-08-25 16:39:23 -07:00
Scott Shawcroft 380cbfba55
Add hash to Socket so it can be used in dicts 2020-08-25 16:15:45 -07:00
Scott Shawcroft f3bc712539
Fix SocketPool radio check 2020-08-25 16:15:00 -07:00
Scott Shawcroft 1527a3ce92
Merge remote-tracking branch 'adafruit/main' into add_pwmio 2020-08-24 18:25:18 -07:00
Scott Shawcroft 5b1a1c773f
Merge pull request #3275 from kmatch98/bitmap_v2
Add `bitmap.blit` command for bitmap copy
2020-08-24 17:58:53 -07:00
Kevin Matocha f55f2bfee1 shorten error strings 2020-08-21 21:40:46 -05:00
Kevin Matocha 7f629624db Added hanging indents to docs per @sommersoft's suggestion 2020-08-21 20:50:15 -05:00
Kevin Matocha 983e1af33d remove other extraneous files 2020-08-21 19:10:13 -05:00
Kevin Matocha dc502a5f26 remove extraneous files 2020-08-21 19:08:25 -05:00
Kevin Matocha 5b6313e642 More tweaks to try to fix documentation failing 2020-08-21 16:13:18 -05:00
Kevin Matocha f1fb2cde17 Minor tweaks to try to fix documentation failing 2020-08-21 16:12:40 -05:00
Dan Halbert 770c204d5a sphinx fixes 2020-08-21 17:03:45 -04:00
Kevin Matocha 9a6a156512 Update documentation string with blank line 2020-08-21 15:26:50 -05:00
Scott Shawcroft 644d2ba7a2 Add more "extern" declarations for gcc10 compat
gcc has tightened the restrictions on forward declarations that lack
"extern".  Fix them up.
2020-08-21 14:39:37 -05:00
Kevin Matocha a9f6d147c4 Merge adafruit/main latest 2020-08-21 14:37:32 -05:00
Kevin Matocha 7e529ed4c5 Merge with latest adafruit/main 2020-08-21 14:28:24 -05:00
Kevin Matocha 3753ea3cd8 Merge remote-tracking branch 'source/main' into main 2020-08-21 14:19:58 -05:00
Kevin Matocha 24ca133396 Updating main to adafruit/main 2020-08-21 14:19:28 -05:00
Kevin Matocha 3747ea29c2 Merge remote-tracking branch 'source/main' into main 2020-08-21 14:14:38 -05:00
Scott Shawcroft 9a8b4e98bf
Add empty lines 2020-08-21 11:36:50 -07:00
Scott Shawcroft 83deea0e03
Fix copy pasta and stub build 2020-08-21 11:17:42 -07:00
Scott Shawcroft a5b01f7361
Merge remote-tracking branch 'adafruit/main' into add_pwmio 2020-08-21 11:13:53 -07:00
Scott Shawcroft 701e80a025
Make socket reads interruptable 2020-08-21 11:00:02 -07:00
Dan Halbert 8d785cbbe5 fix stubs; make translate 2020-08-21 11:37:15 -04:00
Dan Halbert f714f53552 Merge remote-tracking branch 'adafruit/main' into ble_hci 2020-08-21 10:45:05 -04:00
Dan Halbert 0e30dd8bcc merge from upstream; working; includes debug_out code for debugging via Saleae for posterity 2020-08-20 20:29:57 -04:00
Scott Shawcroft 400701004b
Merge pull request #3279 from hierophect/esp32-pulseinout
ESP32-S2: Add PulseOut and PulseIn
2020-08-20 11:24:08 -07:00
Scott Shawcroft 80b15f6b3b
Add error handling w/temp debug logs 2020-08-19 17:51:33 -07:00
Scott Shawcroft eb8b42aff1
Add basic error handling 2020-08-19 14:23:28 -07:00
Scott Shawcroft dcc42f6281
Remove debug prints 2020-08-19 14:23:28 -07:00
Scott Shawcroft b3a449c276
Turn on json and enable socket.close 2020-08-19 14:23:28 -07:00
Scott Shawcroft 430530c74b
SSL works until it runs out of memory 2020-08-19 14:23:28 -07:00
Scott Shawcroft eb2c38825e
HTTP works with my adafruit_requests 2020-08-19 14:23:18 -07:00
Scott Shawcroft c9ece21c28
SocketPool stubbed out 2020-08-19 14:22:13 -07:00
Scott Shawcroft 7bdd243bf6
Ping works! 2020-08-19 14:22:13 -07:00
Scott Shawcroft 3860991111
Ping work and start to add socketpool 2020-08-19 14:22:13 -07:00
Scott Shawcroft c53a72d3f5
Fix ipaddress import and parse ipv4 strings 2020-08-19 14:22:13 -07:00
Scott Shawcroft c62ab6e09a
Add ipaddress 2020-08-19 14:22:12 -07:00
Scott Shawcroft ddcff85fa2
Add debugging. Scanning doesn't crash but returns no results. Need to config station. 2020-08-19 14:22:12 -07:00
Scott Shawcroft 1a6f4e0fe0
Scanning WIP. Need to sort out supervisor memory 2020-08-19 14:22:12 -07:00
Scott Shawcroft c5b8401a15
First crack at native wifi API 2020-08-19 14:21:59 -07:00
Yihui Xiong 9aca580195 fix 2020-08-19 21:33:51 +08:00
Yihui Xiong 8bab7b664c support to get HID OUT report 2020-08-19 20:18:17 +08:00
Scott Shawcroft 6857f98426
Split pulseio.PWMOut into pwmio
This gives us better granularity when implementing new ports because
PWMOut is commonly implemented before PulseIn and PulseOut.

Fixes #3211
2020-08-18 13:08:33 -07:00
Lucian Copeland da75445cd5 Style changes, reposition runtime errors 2020-08-18 11:42:06 -04:00
Dan Halbert 6e5c2b3fe2
Merge pull request #3260 from rhooper/pixelbuf-iterable
Make pixelbuf support iterables and floats
2020-08-17 11:56:31 -04:00
Kevin Matocha 6c199c5d69 Update documentation to remove whitespaces 2020-08-15 15:58:04 -05:00
Dan Halbert 1c8e11b2cb bug in char get_value; raise NotImpl; better arg validation 2020-08-14 23:38:58 -04:00
Lucian Copeland 0fc730bc5a Expand PulseOut API, debug cleanup 2020-08-14 16:36:02 -04:00
Kevin Matocha bfa9904f3e Corrected erroneous edit to fill description to -> None 2020-08-14 14:28:06 -05:00
Kevin Matocha e84723abba Bug fixes related to input parameter handling x1,y1. Update comments 2020-08-14 14:22:34 -05:00
Kevin Matocha b1fce9e933 Deleted trailing whitespace 2020-08-14 13:36:59 -05:00
Kevin Matocha a66ef32da2 Added inclusive indexing for x2,y2, fixed default value handling for x1,y1, added bitmap palette comparison 2020-08-14 13:15:01 -05:00
Margaret Matocha 824f47d6e9 Added bitmap.blit function for bitmap slice copy 2020-08-14 12:59:57 -05:00
Margaret Matocha 4ba9ff892c Added bitmap.blit function for copying slices of bitmaps 2020-08-14 12:59:48 -05:00
Lucian Copeland f9512983ff Add PulseOut 2020-08-14 12:21:41 -04:00
Yihui Xiong 52990a332d fix 2020-08-14 17:48:15 +08:00
Kevin Matocha 14f5d03b6d bringing up to date 2020-08-13 18:59:00 -05:00
Scott Shawcroft ff5902f9f8
Merge branch 'main' into pixelbuf-iterable 2020-08-13 11:55:51 -07:00
Yihui Xiong e7da652711 able to change ble mac address 2020-08-13 16:54:29 +08:00
Jeff Epler c1400bae9b sharpmemory: Implement support for Sharp Memory Displays in framebufferio 2020-08-12 07:32:18 -05:00
Jeff Epler 9c4f644641 framebufferio: add dirty row tracking 2020-08-12 07:32:18 -05:00
Dan Halbert 06f3b4048a fix #3228 for nrf; still needs to be fixed for HCI; tested 2020-08-11 16:21:16 -04:00
Roy Hooper 1b7709f325 use the stack 2020-08-10 18:42:05 -04:00
Roy Hooper ef1782f85e fix trailing whitespace 2020-08-10 12:04:44 -04:00
Roy Hooper 00a3a25b94 revert error to avoid translation changes 2020-08-08 18:40:45 -04:00
sommersoft ce9bc1258a support_matrix.rst: pre-process space chars in internal link names; would cause a no-id situation when names like 'ndGarage[n°] Bit6: FeatherSnow-v2' were parsed. 2020-08-08 11:37:49 -05:00
Dan Halbert 0f4b969d62 discovery of Nordic UART service working 2020-08-08 00:29:37 -04:00
sommersoft c374368053 support_matrix.rst: add internal links to boards in the table 2020-08-07 22:52:34 -05:00
Roy Hooper e73dba21d2 make pixelbuf handle floats and iterables 2020-08-07 18:42:06 -04:00
Margaret Matocha 64c9baa6aa Added bitmap.insert function for slice copy into a bitmap from another bitmap 2020-08-07 15:46:00 -05:00
Jeff Epler 354edd9431
Merge pull request #3252 from ciscorn/pyi
Some improvements to the core module docs
2020-08-07 10:11:40 -05:00
Taku Fukada 56c898da80 Modify some Python stubs 2020-08-07 01:01:28 +09:00
Taku Fukada 887eb3b6d9 Apply a Sphinx transform to make the core module docs look better 2020-08-07 00:01:31 +09:00
Jeff Epler 93b373d617 "pop from empty %q"
Saves 12 bytes code on trinket m0
2020-08-04 18:42:09 -05:00
Jeff Epler c37a25f0e5 Use qstrs to save an additional 4 bytes 2020-08-04 14:45:45 -05:00
Jeff Epler dddd25a776 Combine similar strings to reduce size of translations
This is a slight trade-off with code size, in places where a "_varg"
mp_raise variant is now used.  The net savings on trinket_m0 is
just 32 bytes.

It also means that the translation will include the original English
text, and cannot be translated.  These are usually names of Python
types such as int, set, or dict or special values such as "inf" or
"Nan".
2020-08-04 13:34:29 -05:00
Dan Halbert 0a60aee3e4 wip: compiles 2020-08-02 11:36:38 -04:00
Jeff Epler d69f081c04 Merge remote-tracking branch 'origin/main' into blm_badge 2020-07-30 07:24:48 -05:00
Christian Walther 8498e7f2cd Fix inability to set values in 32-bit Bitmap. 2020-07-30 00:35:25 +02:00
Scott Shawcroft 5e86262694
Merge pull request #3187 from jepler/ulab-restructure-document
Upgrade ulab
2020-07-29 10:48:27 -07:00
Scott Shawcroft 05a1519e5d
Merge pull request #3214 from kmatch98/bitmap_write
Updated Group.c to correct bug with insert into displayio.Group
2020-07-29 10:46:33 -07:00
Jeff Epler 9b8df7f635 Upgrade ulab
This version
 * moves source files to reflect module structure
 * adds inline documentation suitable for extract_pyi
 * incompatibly moves spectrogram to fft
 * incompatibly removes "extras"

There are some remaining markup errors in the specific revision of
extmod/ulab but they do not prevent the doc building process from
completing.
2020-07-28 16:57:48 -05:00
Margaret Matocha 0887bc2112 Updated to remove else statment, attempt to remove excess mpy-cross... file 2020-07-28 15:03:51 -05:00
Margaret Matocha 076c5f946f Updated to remove unnecessary else statement 2020-07-28 14:53:50 -05:00
Margaret Matocha fd7801415a Deleted mpy-cross file 2020-07-28 14:53:09 -05:00
Dan Halbert aa97ea2501 Merge remote-tracking branch 'adafruit/main' into blm_badge 2020-07-28 14:15:02 -04:00
Dan Halbert e5e132a364 add blm_badge; add CIRCUITPY_AUDIOBUSIOIO_I2SOUT 2020-07-28 11:49:54 -04:00
Margaret Matocha db26e894fb Updated Group.c to correct bug with insert into groups 2020-07-27 22:25:21 -05:00
Taku Fukada d356581651 Fix several type hints 2020-07-27 18:05:13 +09:00
Taku Fukada 54a342a7f5 Add and correct some type hints 2020-07-24 18:20:03 +09:00
Scott Shawcroft 543708416b
Merge pull request #3195 from tannewt/remove_i2c_stop
Remove stop kwarg from I2C writeto.
2020-07-23 14:39:51 -07:00
Scott Shawcroft 4b6e02949d
Remove stop kwarg from I2C writeto.
Fixes #2082
2020-07-23 11:06:14 -07:00
Scott Shawcroft 2bd6d05663
Add externs. GCC10 complains about duplicate defines 2020-07-22 16:26:46 -07:00
Scott Shawcroft 049921fec8
Merge branch 'main' into memmonitor 2020-07-22 14:00:28 -07:00
Scott Shawcroft 1ec3580946
Merge branch 'main' into memmonitor 2020-07-22 12:24:19 -07:00
Scott Shawcroft eb24653d3f
Fix BluetoothError doc typo we copied 2020-07-21 18:30:29 -07:00
Scott Shawcroft ee019a96ba
Updates based on review 2020-07-21 16:08:41 -07:00
dherrada 9e3fa863f1
Merge branch 'main' into type_hints 2020-07-21 16:18:51 -04:00
Scott Shawcroft 0c6935e336
Merge branch 'main' into disable_network 2020-07-20 16:28:22 -07:00
Kenny efeae0d84f fix 3169: Polygon.points property
The getter for vectorio.Polygon#points was not updated with the data type change of the stored points list.

This moves the implementation to shared_module and updates the data type to reflect the actual state.
2020-07-19 12:27:35 -07:00
Scott Shawcroft 610e0171aa
Disable existing native networking.
We're moving towards a co-processor model and a Wiznet library is
already available.

New native APIs will replace these for chips with networking like the
ESP32S2 but they won't be these.
2020-07-17 17:43:02 -07:00
Scott Shawcroft 07f031c708
Add ignore() and fix docs 2020-07-17 17:15:04 -07:00
Scott Shawcroft a1e4814a27
Get AllocationAlarm working 2020-07-17 17:15:03 -07:00
Scott Shawcroft 518d909b2c
Add memorymonitor module 2020-07-17 17:15:03 -07:00
dherrada 612c6bb86b
Merge branch 'main' into type_hints 2020-07-17 14:55:30 -04:00
dherrada d64b4e3059 Made more requested changes 2020-07-17 14:53:51 -04:00
Dan Halbert 6494bbdc64 snapshot 2020-07-16 23:14:49 -04:00
dherrada bfcaa4b2b4 Made requested changes in displayio 2020-07-16 16:11:22 -04:00
Dan Halbert b08b0264cc back to working; check for extended advertising support 2020-07-15 09:46:13 -04:00
Scott Shawcroft 08375c7930
Merge pull request #2780 from AndrewR-L/patch-1
busio/UART: Correct and clarify readline() return.
2020-07-13 16:29:58 -07:00
Scott Shawcroft 51c888d4be
Merge pull request #3003 from Flameeyes/master
License tagging according to REUSE specifications.
2020-07-13 16:28:49 -07:00
Dan Halbert f6869c69c5 wip: advertising; not tested 2020-07-12 19:45:23 -04:00
Dan Halbert f03045b97e address working; improved pkt dump 2020-07-08 23:15:48 -04:00
Jeff Epler 6d97f6fccc audioio: Remove compatibility code
These items were aliased from audiocore to audioio for compatibility
with 4.x, but according to our deprecation schedule can be removed
in 6.0.
2020-07-08 20:31:35 -05:00
Dan Halbert a5ab2829eb use zephyr include files; wip: compiles 2020-07-08 09:33:41 -04:00
Diego Elio Pettenò 34b4993d63 Add license to some obvious files. 2020-07-06 19:16:25 +01:00
dherrada bce77adecd Added type hints previously missed 2020-07-03 16:03:19 -04:00
dherrada 9911b64fa1 Added type hints to ustack 2020-07-03 15:52:53 -04:00
dherrada 657c651e0e Added type hints to uheap 2020-07-03 15:51:39 -04:00
dherrada 4c5a9d1e3a Added type hints to time 2020-07-03 15:49:51 -04:00
dherrada 4758081e10 Added type hints to struct 2020-07-03 15:45:29 -04:00
dherrada 45b6e0174e Added type hints to storage 2020-07-03 15:38:40 -04:00
dherrada a88004e509 Added type hints to rtc 2020-07-03 15:27:11 -04:00
dherrada 97d405e109 Added type hints to random 2020-07-03 15:25:58 -04:00
dherrada e237dfe3c5 Added type hints to os 2020-07-03 15:18:44 -04:00
dherrada aaa550b33e Added type hints to network 2020-07-03 15:10:56 -04:00
dherrada 9122d0b9f4 Added type hints to multiterminal 2020-07-03 15:08:16 -04:00
dherrada 591cc1a243 Added type hints to math 2020-07-03 15:04:43 -04:00
dherrada f56deb60c6 Added type hints to _eve 2020-07-03 14:48:16 -04:00
dherrada d0d949cd24 Made every init return None 2020-07-03 14:23:34 -04:00
dherrada d358c915c3 Fixed init formatting 2020-07-03 14:00:06 -04:00
dherrada 3df03a5650 Made most of the requested changes 2020-07-03 13:49:00 -04:00
dherrada 843ff5d302 Added type hints to wiznet 2020-07-03 11:44:16 -04:00
dherrada 5163618d23 Added type hints to watchdog 2020-07-03 11:42:07 -04:00
dherrada 9c842c5a67 Added type hints to usb_midi 2020-07-03 11:40:20 -04:00
dherrada e089862a6c Added type hints to usb_hid 2020-07-03 11:38:02 -04:00
dherrada 0a657091c6 Added type hints to touchio 2020-07-03 11:34:45 -04:00
dherrada f8229372bd Added type hints to terminalio 2020-07-03 11:31:57 -04:00
dherrada 6e4c76a926 Added type hints to _stage 2020-07-03 11:26:48 -04:00
dherrada 9116470fd7 Added type hints to socket 2020-07-03 11:24:53 -04:00
dherrada 71ec419da6 Added type hints to sdioio 2020-07-03 11:16:41 -04:00
dherrada 48443ce02b Added type hints to sdcardio 2020-07-03 11:15:22 -04:00
dherrada d9a98bd05c Added type hints to rotaryio 2020-07-03 11:13:16 -04:00
dherrada c8437e6595 Added type hints to rgbmatrix 2020-07-03 11:10:13 -04:00
dherrada 93d20077cc Added type hints to pulseio 2020-07-03 11:04:03 -04:00
dherrada a2c7e2795b Added type hints to ps2io 2020-07-03 10:51:39 -04:00
dherrada 41f12a7a6c Added type hints to pixelbuf 2020-07-03 10:47:44 -04:00
dherrada e273b9a11f Added type hints to _pew 2020-07-03 10:42:57 -04:00
dherrada 0abf45a446 Added type hints to nvm 2020-07-03 10:37:55 -04:00
dherrada 0a8d9eed45 Added type hints to microcontroller 2020-07-03 10:33:28 -04:00
dherrada 2e8b8c7b95 Added type hints to i2cperipheral 2020-07-03 10:29:39 -04:00
dherrada 6a3968d805 Added type hints to gnss 2020-07-03 10:26:31 -04:00
dherrada d73348f673 Added type hints to gamepadshift 2020-07-03 10:19:34 -04:00
dherrada ff8604bb82 Added type hints to gamepad 2020-07-03 10:17:35 -04:00
dherrada 51841447be Added type hints to frequencyio 2020-07-03 10:14:40 -04:00
dherrada ca0e8ea1eb Added type hints to framebufferio 2020-07-03 10:12:04 -04:00
dherrada 48ea2271b7 Added type hints to fontio 2020-07-03 10:08:25 -04:00
dherrada 783cc4de39 Added type hints to displayio 2020-07-03 10:05:14 -04:00
Scott Shawcroft 70fdde4aaa
Remove trailing space 2020-07-02 15:11:40 -07:00
dherrada 9b4ffc0571 Changed unions to ReadableBuffer and WriteableBuffer 2020-07-02 17:47:52 -04:00
Scott Shawcroft c33542f978
Merge branch 'main' into patch-1 2020-07-02 13:56:09 -07:00
dherrada dd27fdfbe3 Added type hints to countio 2020-07-02 14:15:43 -04:00
dherrada 51fd286cbf Added type hints to board 2020-07-02 14:14:05 -04:00
dherrada 26f1fd0071 Added type hints to _bleio 2020-07-02 14:11:25 -04:00
dherrada 54cb1feea0 Removed all 'self, )' 2020-07-02 13:28:36 -04:00
dherrada 522b17ca93 Made suggested changes 2020-07-02 13:25:07 -04:00
dherrada ac113fdc81 Changed bytearray to a union 2020-07-02 12:39:17 -04:00
dherrada ffc5f0c338 Added type hints to bitbangio 2020-07-02 12:37:03 -04:00
dherrada ed476a417c Added type hints to audiopwmio 2020-07-02 12:07:03 -04:00
dherrada e114b31a7a Added type hints to audiomp3 2020-07-02 12:02:21 -04:00
dherrada 24bca06db0 Added type hints to audiomixer 2020-07-02 12:02:13 -04:00
dherrada 3d1e0051e6 Added type hints to audioio 2020-07-02 12:02:07 -04:00
dherrada b26ee6c1f6 Added type hints to audiocore 2020-07-02 12:02:02 -04:00
dherrada 2681bd52b5 Did audiobusio 2020-07-02 11:33:18 -04:00
dherrada 627ecadb3f Did aesio 2020-07-02 11:10:53 -04:00
dherrada cb259de5ef Did busio, fixed up analogio 2020-07-02 10:23:17 -04:00
dherrada 6fd6747e9e Added type hints for analogio 2020-07-02 09:36:22 -04:00
Jeff Epler fcddfd0f39
Merge pull request #3083 from tannewt/esp32s2_busio
Add busio support for the ESP32-S2
2020-07-01 21:02:08 -05:00
Jeff Epler e33accae4d ulab: document sosfilt 2020-07-01 10:15:09 -05:00
Dan Halbert 11cb3e3b4b hci skeleton done; not working yet 2020-06-30 23:19:40 -04:00
Dan Halbert f879114c43 do HCI pin init in Python, not here 2020-06-26 19:27:05 -04:00
Dan Halbert 1bc2e979eb wip; compiles; much commented out 2020-06-26 17:23:20 -04:00
Jeff Epler 472a04ba4b sdioio: Remove junk in comments 2020-06-26 13:17:00 -05:00
Jeff Epler 0f2fb93d14
Update shared-bindings/sdcardio/SDCard.c
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
2020-06-26 13:15:30 -05:00
Jeff Epler 05837b2841 sdioio: Add shared-bindings
There is no implementation yet.
2020-06-26 11:50:25 -05:00
Jeff Epler 159728b550 shared-bindings: Factor out validate_list_is_free_pins
This will ultimately be used by SDIO, where a variable length list
of data lines is called for.
2020-06-26 11:50:24 -05:00
Jeff Epler 57fde2e07b sdcardio: implement new library for SD card I/O
Testing performed: That a card is successfully mounted on Pygamer with
the built in SD card slot

This module is enabled for most FULL_BUILD boards, but is disabled for
samd21 ("M0"), litex, and pca10100 for various reasons.
2020-06-26 11:50:23 -05:00
Dan Halbert 759929c24a hci early wip; refactor supervisor bluetooth.c for nrf: tested 2020-06-25 20:57:17 -04:00
Jeff Epler 1d2cc0b968 I2CPeripheral: Rename class and its module
This is an incompatible change.
2020-06-25 11:44:19 -05:00
Jeff Epler 9110e36636 Use main/selected terminology in docstrings
Also copy some notes from busio docstrings to bitbangio docstrings
2020-06-25 11:42:23 -05:00
Scott Shawcroft c5fa9730a8
Compiles! 2020-06-24 12:47:59 -07:00
Scott Shawcroft a26102607e
Add UART support 2020-06-24 12:47:58 -07:00
Kamil Tomaszewski ab4c09cea7 gnss: Add timestamp 2020-06-24 11:14:44 +02:00
Kamil Tomaszewski 3509dad5b3 gnss: Remove start and stop 2020-06-24 11:14:44 +02:00
Kamil Tomaszewski c49f4bcc85 gnss: add a comment about the units 2020-06-24 11:14:44 +02:00
Kamil Tomaszewski 84f424f631 gnss: Implement new library for GNSS 2020-06-24 11:14:44 +02:00
Jeff Epler a580f0f1c4 _pew: move to common-hal
I noticed that this code was referring to samd-specific functionality,
and isn't enabled except in one samd board (pewpew10).  Move it.

There is incomplte support for _pew in mimxrt10xx which then caused build
errors; adding a #if guard to check for _pew being enabled fixes it.
The _pew module is not likely to be important on mimxrt but I'll leave the
choice to remove it to someone else.
2020-06-22 10:45:27 -05:00
Jeff Epler 32a29ffdff shared-bindings: Change docstrings with '\x...' chars to raw strings
Closes: #3032
2020-06-14 13:05:08 -05:00
Jeff Epler 3c3cad5ae6 docs: Improve 5.0.x <-> main branch doc linkrot
This improves, but does not entirely fix, the broken links that result
from the autoapi change.  It fixes module-level links, but class links
still do not work (e.g., /shared-bindings/displayio/Palette.html (5.0.x)
is now just /shared-bindings/displayio/#displayio.Palette).
2020-06-14 11:12:35 -05:00
Diego Elio Pettenò dd5d7c86d2 Fix up end of file and trailing whitespace.
This can be enforced by pre-commit, but correct it separately to make it easier to review.
2020-06-03 10:56:35 +01:00
Scott Shawcroft 959f7297da
Merge remote-tracking branch 'adafruit/master' into wdt-nrf 2020-06-01 17:01:16 -07:00
Scott Shawcroft a170c5e13a
Merge branch 'master' into update-ulab 2020-06-01 15:19:21 -07:00
Scott Shawcroft 323cca8910
Merge remote-tracking branch 'adafruit/master' into wdt-nrf 2020-06-01 15:18:12 -07:00
Jeff Epler 8af77cb91f ulab: docs: Fix markup error 2020-06-01 11:02:51 -05:00
Jeff Epler 5061405eb3 fix spelling 2020-06-01 09:16:55 -05:00
Jeff Epler 18c659780e ulab: update
.. add new modules and functions to our shared-bindings stubs
2020-06-01 09:02:29 -05:00
Jeff Epler 89bd87d9fc shared-bindings: Fix docs of storage.VfsFat
This is almost, but not entirely, a whitespace change.

"..." was missing or mis-placed in several places

The invalid syntax 'def f(self, ):' was used in several places.
2020-05-31 10:35:42 -05:00
Scott Shawcroft 2fd7a43f2f
Merge remote-tracking branch 'adafruit/master' into wdt-nrf 2020-05-29 10:16:24 -07:00
Jeff Epler 90571e7b7f Various doc examples: Fix the "/ 18" copypasta bug 2020-05-27 16:43:35 -05:00
Scott Shawcroft 1ed4978620
Remove NONE from mode enum and doc tweaks 2020-05-27 10:58:21 -07:00
Sean Cross aac5a4f178 watchdog: use common_hal_watchdog_* pattern
This pulls all common functionality into `shared-bindings` and keeps
platform-specific code inside `nrf`. Additionally, this performs most
validation in the `shared-bindings` site.

The only validation that occurs inside platform-specific `common-hal`
code is related to timeout limits that are platform-specific.

Additionally, all documentation is now inside the `shared-bindings`
directory.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:38:29 +08:00
Sean Cross dbf1bef56a watchdog: support catching the timeout
With this patch, the exception can now be caught:

    import microcontroller
    import watchdog
    import time

    wdt = microcontroller.watchdog
    wdt.timeout = 5

    while True:
        wdt.mode = watchdog.WatchDogMode.RAISE
        print("Starting loop -- should exit after five seconds")
        try:
            while True:
                time.sleep(10)
                # pass # This also works for a spinloop
        except watchdog.WatchDogTimeout as e:
            print("Watchdog Expired (PASS)")
        except Exception as e:
            print("Other exception (FAIL)")
    print("Exited loop")

This prints:

    Starting loop -- should exit after five seconds
    Watchdog Expired (PASS)
    Starting loop -- should exit after five seconds
    Watchdog Expired (PASS)
    Starting loop -- should exit after five seconds
    Watchdog Expired (PASS)

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:50 +08:00
Sean Cross c7efc94a33 watchdog: move timeout exception to shared-bindings
Make this exception globally available to all platforms that have
enabled the watchdog timer.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross 08362c9cab watchdogtimer: refactor to new api
This refactors the WatchDogTimer API to use the format proposed in
https://github.com/adafruit/circuitpython/pull/2933#issuecomment-632268227

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross 87737fb50a watchdog: fix documentation build error
Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross 595f6387c2 watchdog: rename module from `wdt` and move to `microcontroller`
This also places it under the `microcontroller` object.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross f4719609f7 wdt: add watchdog support
This adds shared bindings for a watchdog timer, based on the API
provided by micropython.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:48 +08:00
Dan Halbert 3574670226
Merge pull request #2931 from tannewt/esp32s2_digitalio
Finish digitalio and pin use tracking for ESP32S2
2020-05-26 19:18:45 -04:00
Scott Shawcroft 2ffd70417d
Merge remote-tracking branch 'adafruit/master' into esp32s2_digitalio 2020-05-26 13:09:57 -07:00
Roy Hooper d13d0244ec Adjust docs to reflect behaviour. 2020-05-24 20:39:53 -04:00
George Waters c592a2b4db
Simplify pixelbuf set_pixels function 2020-05-22 21:19:17 -04:00
George Waters f078055f59
Use mp_int_t for setting pixelbuf slice indices
When handling negative steps, start and stop need to be mp_int_t so they
can be checked against a potential negative value during the for loop
used to set the slice values.
2020-05-22 16:28:09 -04:00
George Waters 16ffc731f3
Implement negative step for pixelbuf slices 2020-05-21 21:57:45 -04:00
Scott Shawcroft 3bb6a32a20
Merge branch 'master' into esp32s2_digitalio 2020-05-21 08:52:39 -07:00
George Waters 02d0881fca
Fix error when getting a pixelbuf slice 2020-05-20 17:56:08 -04:00
Scott Shawcroft ba724fffb4
Merge remote-tracking branch 'adafruit/master' into esp32s2_digitalio 2020-05-20 10:48:27 -07:00
Scott Shawcroft 49090d1378
Fully implement digitalio and pin-in-use tracking.
Fixes #2901
2020-05-19 17:46:29 -07:00
Sean Cross 34f91f01c6 bleio: adapter: add advertising timeout and status
Add a field to allow specifying a timeout when initiating advertising.
As part of this, add a new property to determine if the device is still
advertising.

Additionally, have the `anonymous` property require a timeout, and set
the timeout to the maximum possible value if no timeout is specified.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-19 15:01:19 +08:00
Sean Cross cfe65742a3 _bleio: support anonymous advertising
Add a new parameter to the `start_advertising()` function to enable
anonymous advertising.  This forces a call to `sd_ble_gap_privacy_set()`
with `privacy_mode` set to `BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY` and
`private_addr_type` set to
`BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE`.

With this, addresses will cycle at a predefined rate (currently once
every 15 minutes).

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-19 15:01:18 +08:00
Scott Shawcroft 2c2b53303d
Merge pull request #2837 from k0d/serial-debug
Add support for a debug console, such as ST-Link VCP.
2020-05-18 18:13:31 -07:00
Mark Olsson 007c92ee6a Enable showing the console on a debug uart 2020-05-19 02:02:52 +02:00
warriorofwire dde66cadde remove a duplication in polygon.c 2020-05-18 13:32:06 -07:00
warriorofwire 4bbb80e31a vectorio: speed up polygon
This change takes polygon from 126k pixels per second fill to 240k pps fill
  on a reference 5 point star 50x66px polygon, updating both location and shape
  at 10hz.  Tested on an m4 express feather.

As a curiosity, the flat-out fill rate of a shape whose get_pixel is `return 0;`
  fills just shy of 375k pixels per second.
2020-05-18 13:32:06 -07:00
ppolk-nocimed c6406c74ec Added DigitalInOut suggestion 2020-05-16 13:21:34 -07:00
ppolk-nocimed f76ff1eb69 Fixed Optional[Pull] 2020-05-16 13:14:50 -07:00
ppolk-nocimed db924fb01e Digital In Out Type Hints 2020-05-16 12:47:49 -07:00
Thea Flowers 7d167560af Note that nvm.ByteArray is available at microcontroller.nvm
Fixes #2766
2020-05-15 14:53:14 -07:00
Scott Shawcroft 0d8bca92e2
Merge pull request #2810 from dherrada/master
Pyi integration
2020-05-15 10:31:05 -07:00
Sean Cross f9ed3acf6d aesio: specify writable buffers for destination buffers
When calling `AES.decrypt_into()` or `AES.encrypt_into()`, the
destination buffers may be any buffer kind.  However, we currently
aren't checking to make sure the destination buffer is actually
writable.

Specify `MP_BUFFER_WRITE` for the destination buffers of both of these
objects so we don't inadvertently write to immutable data.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-15 10:22:42 +08:00
Sean Cross aba36e4abf aesio: use bufinfo rather than mp_str_bytes
In order to accept both `bytes` objects and `bytearray` objects, use a
`bufinfo` construct to retrieve the data rather than
`mp_obj_str_get_data()`.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-15 10:16:00 +08:00
Scott Shawcroft 15c2d16bf9
Fix help doc 2020-05-14 16:06:13 -07:00
Scott Shawcroft afc84c2fd1
Fix ulab, math and template. 2020-05-14 15:58:36 -07:00
dherrada b477c4812d
Fixed minor indentation issue 2020-05-14 16:58:25 -04:00
Scott Shawcroft db4dbe0752
Merge pull request #2889 from jepler/gamepad-tick
Gamepad, GamepadShift: Fix after lower-power by enabling supervisor tick
2020-05-13 11:53:23 -07:00
Scott Shawcroft 3ffa5604fc
Update countio to python stub docs 2020-05-13 08:36:16 -07:00
Scott Shawcroft 7546d47f77
Merge remote-tracking branch 'adafruit/master' into improve_verification 2020-05-13 08:23:55 -07:00
Jeff Epler 23ba58bbf5 Gamepad & GamepadShift: Initially allocate as long-lived
This makes less heap churn and decreases code size a tiny bit
2020-05-13 10:14:37 -05:00
Jeff Epler fbf052bb27 Gamepad & GamepadShift: Enable ticks while object exists
Otherwise, button presses might not be noticed.
2020-05-13 10:14:37 -05:00
Scott Shawcroft 4e646ee6e4
Move vectorio to stubs 2020-05-12 18:40:02 -07:00
Scott Shawcroft cde6651721
Merge remote-tracking branch 'adafruit/master' into improve_verification 2020-05-12 18:23:59 -07:00
Scott Shawcroft 277e8d528b
Merge branch 'master' into Optical-Encoder-Module 2020-05-12 18:22:57 -07:00
Scott Shawcroft 4e8de3c554
Swap sphinx to autoapi and the inline stubs 2020-05-12 17:28:24 -07:00
Scott Shawcroft d274074f01
Merge remote-tracking branch 'adafruit/master' into vectorio 2020-05-12 12:29:05 -07:00
Scott Shawcroft bc40034a08
Merge branch 'master' into Optical-Encoder-Module 2020-05-12 12:12:51 -07:00
Scott Shawcroft a1091bbfbb
Merge pull request #2871 from DavePutz/Issue2812
Throw a NotImplementedError for time functions on boards without long ints
2020-05-12 11:40:49 -07:00
dherrada c534a872a2
Merge branch 'master' into master 2020-05-12 12:26:02 -04:00
dherrada 6490137812
Did usb_hid, usb_midi, ustack, wiznet 2020-05-12 12:08:46 -04:00
dherrada e4589543fb
Did time, touchio, uheap 2020-05-12 11:43:24 -04:00
dherrada 991045b9ce
Did struct, supervisor, terminalio 2020-05-12 11:28:33 -04:00
Daniel Pollard 22bf99ccc4 Fixed underline in documentation 2020-05-12 14:52:48 +10:00
Daniel Pollard ee2cb703c8 merged master 2020-05-12 14:41:28 +10:00
warriorofwire 78444a1018 fix VectorShape on_dirty callback registration being set for the wrong type 2020-05-11 21:21:05 -07:00
warriorofwire 040beb0577 Clean up circle documentation 2020-05-11 21:15:40 -07:00
DavePutz 4712f9f104
Merge branch 'master' into Issue2812 2020-05-11 21:48:54 -05:00
Scott Shawcroft 1b0c52c8ca
Merge pull request #2877 from rhooper/pixelbuf-doc-fix
Pixelbuf doc fix
2020-05-11 15:42:33 -07:00
dherrada 603df58f97
Did stage, socket, storage 2020-05-11 13:40:02 -04:00
dherrada c7a9d49cba
Did rgbmatrix, rotaryio, and RTC 2020-05-11 13:00:19 -04:00
dherrada 838b6c5685
Did ps2io, pulseio, random 2020-05-11 10:48:11 -04:00
warriorofwire eb3d5fa453 ujson: do not eat trailing whitespace
Ujson should only worry about whitespace before JSON.  This becomes apparent when you are using MP stream protocol to read directly from input buffers.

When you attempt to read(1) on a UART (and possibly other protocols) you have to wait for either the byte or the timeout.

Fixes:
- Waiting for a timeout after you have completed reading a correct and complete JSON off the input.
- Raising an OSError after reading a correct and complete JSON off the input.
- Eating more data than semantically owned off the input buffer.
- Blocking to start parsing JSON until the entire JSON body has been loaded into a potentially large, contiguous Python object.

Code you would write before:
```
line = board_busio_uart_port.read_line()
json_dict = json.loads(line)
```
or reaching for fixed buffers and swapping them around in Python.

Code that did not work before that does now:
```
json_dict = json.load(board_busio_uart_port)
```

- This removes the need for intermediate copies of data when reading JSON from micropython stream protocol inputs.
- It also increases total application speed by parsing JSON concurrently with receiving on boards that read from UART via DMA.
- It simplifies code that users write while improving their apps.
2020-05-10 20:45:42 -07:00
Roy Hooper 09fedb3fd5 fix another doc error (pixelsx - thanks @theacodes) 2020-05-10 21:35:37 -04:00
Roy Hooper 70f2ef3f8e Fix docs some more 2020-05-10 19:50:10 -04:00
Roy Hooper 2f7c0ec8e4 Minor fixes to _pixelbuf.PixelBuf docs 2020-05-10 16:22:01 -04:00
warriorofwire 4086600b61 vectorio: switch per-shape transform to Display
Rather than maintain a transform per-shape, we'll just use whatever
  settings are on the Display.  Currently only transpose is done.
2020-05-09 22:15:51 -07:00
warriorofwire 206d0e598a Add vectorio: for drawing shapes
vectorio builds on m4 express feather

Concrete shapes are composed into a VectorShape which is put into a displayio Group for display.

VectorShape provides transpose and x/y positioning for shape implementations.

Included Shapes:

* Circle
  - A radius; Circle is positioned at its axis in the VectorShape.
  - You can freely modify the radius to grow and shrink the circle in-place.

* Polygon
  - An ordered list of points.
  - Beteween each successive point an edge is inferred.  A final edge closing the shape is inferred between the last
    point and the first point.
  - You can modify the points in a Polygon.  The points' coordinate system is relative to (0, 0) so if you'd like a
      top-center justified 10x20 rectangle you can do points [(-5, 0), (5, 0), (5, 20), (0, 20)] and your VectorShape
      x and y properties will position the rectangle relative to its top center point

* Rectangle
  A width and a height.
2020-05-09 15:38:22 -07:00
DavePutz e7fc806034
Throw a NotImplementedError for time functions on boards without long ints
Fix for Issue #2812. Instead of reporting a missing attribute for functions such as time.time() and time.mktime(); platforms that do not have long integer support will raise a NotImplementedError
2020-05-08 16:33:26 -05:00
dherrada 09530e5dc3
Did os, _pixelbuf, _pew 2020-05-08 16:03:39 -04:00
Kattni Rembor a83d1d7b4b Update wheel to colorwheel and fix RGB order. 2020-05-08 14:44:41 -04:00
Kattni Rembor 37e5ff7757 Update colorwheel from GRB to RGB. 2020-05-08 13:25:52 -04:00
dherrada d750096bef
Did neopixel, network, nvm 2020-05-07 18:40:46 -04:00
dherrada e31e9eeaa1
Did math, microcontroller, and multiterminal 2020-05-07 15:59:52 -04:00
dherrada 4f33a20d17
Added gamepad, gamepadshift, and i2cslave 2020-05-07 15:10:44 -04:00
dherrada a3d5adb43c
Did _eve, fontio, framebufferio, and frequencyio 2020-05-07 11:56:46 -04:00
dherrada 2ebe3035df
Did board, digitalio, displayio 2020-05-07 10:54:09 -04:00
Daniel Pollard 84c806a4be updated descriptions and build variable 2020-05-07 12:42:46 +10:00
spkuehl af55af216a Fix type in RTC documentation. 2020-05-06 14:11:11 -05:00
Sean Cross b168784fa0 aesio: add basic AES encryption and decryption
This adds initial support for an AES module named aesio.  This
implementation supports only a subset of AES modes, namely
ECB, CBC, and CTR modes.

Example usage:

```
>>> import aesio
>>>
>>> key = b'Sixteen byte key'
>>> cipher = aesio.AES(key, aesio.MODE_ECB)
>>> output = bytearray(16)
>>> cipher.encrypt_into(b'Circuit Python!!', output)
>>> output
bytearray(b'E\x14\x85\x18\x9a\x9c\r\x95>\xa7kV\xa2`\x8b\n')
>>>
```

This key is 16-bytes, so it uses AES128.  If your key is 24- or 32-
bytes long, it will switch to AES192 or AES256 respectively.

This has been tested with many of the official NIST test vectors,
such as those used in `pycryptodome` at
39626a5b01/lib/Crypto/SelfTest/Cipher/test_vectors/AES

CTR has not been tested as NIST does not provide test vectors for it.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-06 17:40:06 +08:00
Daniel Pollard 8961dd9fe7 changed build variables as per advice 2020-05-06 09:05:14 +10:00
Daniel Pollard bfa5cd9c13 refactor countio based on feedback 2020-05-05 15:23:38 +10:00
Dan Halbert e1366d78b1 trivial change to force rebuild 2020-05-04 23:05:47 -04:00
Dan Halbert b7836aeac6 address review comments 2020-05-04 19:51:08 -04:00
Dan Halbert bae7a5e433 make translate again 2020-05-04 17:26:59 -04:00
Dan Halbert d6c6f9f4f0 add PacketBuffer .incoming_ and .outgoing_packet_length 2020-05-04 15:59:45 -04:00
dherrada 0e465e63b9
Did audiopwmio, bitbangio, and _bleio 2020-05-01 18:23:27 -04:00
Scott Shawcroft 242063e1d0
Merge pull request #2838 from spkuehl/UART_sharedbinding_fix
Fix #2814 Corrected UART output.
2020-05-01 11:05:24 -07:00
spkuehl a3a2dd0f70 Corrected UART output. 2020-04-30 19:14:51 -05:00
dherrada d65e851044
Did audioio, audiomixer, audiomp3 2020-04-30 13:06:09 -04:00
Dan Halbert 46298ddcb4 PacketBuffer doc fixes 2020-04-30 00:36:01 -04:00
Dan Halbert f3078511a6 further cleanup and bug fixing 2020-04-29 23:18:08 -04:00
Dan Halbert 180f5c6a94 Merge remote-tracking branch 'adafruit/master' into ringbuf-fixes 2020-04-29 22:11:22 -04:00
Dan Halbert 3d62f87e29 back to '.packet_size' for compatiblity 2020-04-29 22:10:56 -04:00
Dan Halbert 84cee1ab8d rename and improve PacketBuffer packet length property 2020-04-29 17:49:31 -04:00
dherrada 7ff9b9bc80
Did first 3 2020-04-29 17:36:28 -04:00
dherrada a2a32fea1a
Added newlines after every ellipsis 2020-04-29 15:55:06 -04:00
dherrada 093461e816
Fixed indentation 2020-04-29 15:45:19 -04:00
dherrada deccdcc1d6
Did the same for the rest of busio 2020-04-29 15:20:05 -04:00
dherrada 93d1e53c66
Hopefully fixed whitespace issues 2020-04-29 14:19:04 -04:00
dherrada c7b721f4f1
Fixed some more whitespace 2020-04-28 19:22:03 -04:00
dherrada aacca61598
Fixed whitespace on audiocore 2020-04-28 18:56:19 -04:00
dherrada c3897d0add
Fixed whitespace in analogio 2020-04-28 18:43:40 -04:00
dherrada 724dcda3ec
Fixed whitespace in busio 2020-04-28 18:39:58 -04:00
Scott Shawcroft 755d404edf
Merge remote-tracking branch 'adafruit/master' into lower_power 2020-04-27 16:45:10 -07:00
dherrada 829da5c127
Added inline pyi to audiomp3 2020-04-27 17:29:50 -04:00
dherrada 8330471068
Added inline pyi to audiomixer 2020-04-27 17:20:40 -04:00
dherrada 1363e6e724
Added inline pyi to audiocore 2020-04-27 17:02:48 -04:00
dherrada 088b5b1785
Added inline pyi to audiocore 2020-04-27 16:49:12 -04:00
dherrada e96235d0cf
Added inline pyi to audiobusio 2020-04-27 16:35:03 -04:00
dherrada 8344fce994
Added inline pyi to analogio 2020-04-27 13:06:47 -04:00
dherrada 27e085ec36
Added pyi to OneWire.c 2020-04-25 15:36:16 -04:00
dherrada e7874277ab
Fixed empty lines 2020-04-25 15:35:24 -04:00
dherrada 7070fe1995
Added inline pyi to UART.c 2020-04-25 15:25:31 -04:00
dherrada 28430a9919
Added inline pyi to I2C.c 2020-04-25 15:07:58 -04:00
dherrada 55bdee688f
Reorganized pyi again 2020-04-23 16:14:17 -04:00
dherrada 855c2033b5
Reogranized pyi in spi.c 2020-04-23 15:35:20 -04:00
dherrada a18b991ca9
Added pyi to SPI.c 2020-04-22 15:22:34 -04:00
Jeff Epler b87af3b071 ulab: Update from upstream
Closes: #2787
2020-04-22 09:04:12 -05:00
Dan Halbert 77cd93ac2d merge from adafruit 2020-04-21 17:47:51 -04:00
Dan Halbert 38ec3bc574 further ringbuf cleanup 2020-04-21 17:38:20 -04:00
Jeff Epler 507e17fbf1 displayio: Fix "bus type" problem introduced at 8cba145c90
When allocate_display_bus_or_raise was factored out, the assignment
of the bus's Python type was lost.  Restore it.

This would have affected displays of any type other than RGBMatrix, when
they were created dynamically.  Boards with displays configured in flash
were unaffected.

Closes: #2792
2020-04-21 13:48:34 -05:00
Scott Shawcroft bebf27e733
Merge remote-tracking branch 'adafruit/master' into lower_power
This isn't perfect and needs a bit more testing.
2020-04-20 18:25:13 -07:00
Jeff Epler 898c09c35e RGBMatrix: nonessential change to kick Actions 2020-04-19 09:10:08 -05:00
Jeff Epler 9bfe6b7197 framebufferio: update copyright information 2020-04-17 18:44:07 -05:00
Jeff Epler 8c455f24bf RGBMatrix: this comment no longer describes the code
... allocate_display_bus_or_raise() uses fixed storage, not heap storage.
2020-04-17 18:44:07 -05:00
Jeff Epler 37cb6bafa8 RGBMatrix: documentation got behind the code 2020-04-17 18:44:07 -05:00
Jeff Epler 5fcc6d6286 RGBMatrix: finish renaming from Protomatter
This gets all the purely internal references.  Some uses of
protomatter/Protomatter/PROTOMATTER remain, as they are references
to symbols in the Protomatter C library itself.
2020-04-17 18:44:07 -05:00
Jeff Epler 1b478bbae6 RGBMatrix: remove unneeded properties 2020-04-17 18:43:57 -05:00
Jeff Epler 57ce2d1f41 framebufferio: get width, etc., from protocol, not object property 2020-04-17 18:43:57 -05:00
Jeff Epler 3d6258f63d Rename Protomatter -> RGBMatrix
This is a quick rename, it changes the user-facing names but not the
internal names of things.
2020-04-17 18:43:57 -05:00
Jeff Epler 64c3968a2e protomatter: move get_width/height to common_hal 2020-04-17 18:43:57 -05:00
Jeff Epler 545b6e560a fix doc build 2020-04-17 18:43:57 -05:00
Jeff Epler 1a91a75b9c framebufferio: get more properties direct from underlying framebuffer 2020-04-17 18:43:57 -05:00
Jeff Epler a32337718d Rename _protomatter -> protomatter
I originally believed that there would be a wrapper library around it,
like with _pixelbuf; but this proves not to be the case, as there's
too little for the library to do.
2020-04-17 18:43:57 -05:00
Jeff Epler d1ff23e004 framebufferio: get width, height from framebuffer properties 2020-04-17 18:43:57 -05:00
Jeff Epler d2aac7a754 Protomatter: add width, height properties 2020-04-17 18:43:57 -05:00
AndrewR-L f572b72306
busio/UART: Correct and clarify readline() return.
Surely readline() "rtype" is string not int as stated (and not bytes as some might expect).

Also it is not totally unambiguous what happens on a timeout so it would help to clarify in docs that on a timeout 
it does NOT return with what it has read so far, rather it leaves all that in the buffer ready for a future read and returns nothing.

Likewise clarify that if timeout=0 but there is no newline it DOES return what it has read so far (NOT None). 

At least this is what I think it does and/or is supposed to do!

Python docs are generally not too explicit about what is the proper treatment, so perhaps all the more reason to
clarify the interpretation adopted?
2020-04-17 15:10:36 +01:00
Scott Shawcroft b580b34cbf
Merge remote-tracking branch 'adafruit/master' into lower_power 2020-04-14 17:14:44 -07:00
Jeff Epler 0ce9c008c5 Protomatter: Make all arguments kw-only, add rgb count and optional height checking
They're not readily distinguishable by type.

I also added the requested height optional parameter; this is checked
against the computed one.  It's not feasible to use this parameter to
artificailly reduce the number of used rows, because changes in the
underlying C protomatter library would be required.

Finally, I added a better error message when the number of RGB pins was
not what was expected.
2020-04-14 18:24:59 -05:00
Jeff Epler 880fff80e9 protomatter: Respond to review comments
- rename oe_pin -> output_enable_pin
 - improve and reorganize docstrings
 - rename swapbuffers->refresh
 - rename "paused" -> "brightness", change semantics slightly
 - common_hal several functions
 - clarify why the common_hal routines can't be used directly in the
   protocol's function pointers
 - whitespace cleanups
 - remove prototypes for nonexistent functions
2020-04-14 18:24:59 -05:00
Jeff Epler 5d328c3b44 protomatter: clarify by comment why these functions exist 2020-04-14 18:24:58 -05:00
Jeff Epler ba20bc8b43 framebufferio: move backlight down to the underlying framebuffer 2020-04-14 18:24:58 -05:00
Jeff Epler 129c6369cf protomatter: code style 2020-04-14 18:24:58 -05:00
Jeff Epler 4a05e938ed protomatter: validate pins to give better error message
The numbered error from the underlying library is not helpful for
beginning users
2020-04-14 18:24:58 -05:00
Jeff Epler 9019710a1e protomatter: improve an error message 2020-04-14 18:24:58 -05:00
Jeff Epler baf04b7738 FramebufferDisplay: remove probably not needed constructor arguments 2020-04-14 18:24:58 -05:00
Jeff Epler 50219862e1 protomatter: make docstring match implementation 2020-04-14 18:24:58 -05:00
Jeff Epler a663a7dd30 _protomatter: move get/set paused into shared-module 2020-04-14 18:24:58 -05:00
Jeff Epler 5fcba97a51 Make function name more descriptive 2020-04-14 18:24:58 -05:00
Jeff Epler 89eb45a13c use floor division in docstring
Co-Authored-By: Scott Shawcroft <scott@tannewt.org>
2020-04-14 18:24:58 -05:00
Jeff Epler 09dc46a984 Add Protomatter and FramebufferDisplay 2020-04-14 18:24:54 -05:00
Jeff Epler 8cba145c90 displayio: implement, use allocate_new_display_bus_or_raise 2020-04-14 18:24:54 -05:00
Jeff Epler 6378d600c4 displayio: implement, use allocate_display_or_raise 2020-04-14 18:24:54 -05:00
Scott Shawcroft ada102dd98
Merge pull request #2767 from jepler/update-ulab
ulab: Get updates from upstream
2020-04-14 15:59:33 -07:00
Scott Shawcroft e063b066f0
Merge pull request #2756 from caternuson/bitmap_fill
Add fill method to displayio.Bitmap
2020-04-14 12:54:44 -07:00
Jeff Epler 693928d201 doc updates 2020-04-13 20:10:02 -05:00
caternuson dc75746842 add docstring, clean up 2020-04-09 08:59:26 -07:00
caternuson 49fff2d9b4 initial working fill 2020-04-09 08:43:50 -07:00
sommersoft 61bab8e62e ulab/__init__.rst: fix attribute name; uint8 -> uint16 2020-04-09 08:45:26 -05:00
Scott Shawcroft 317b96e93a
Fix iMX builds 2020-03-31 17:00:30 -07:00
Scott Shawcroft cbe9512691
Merge pull request #2741 from tannewt/fix_packetbuffer_server
Fix PacketBuffer server support
2020-03-31 13:39:34 -07:00
Jeff Epler 54e8c63b4f
Merge pull request #2730 from tannewt/fix_fourwire_phase_polarity
Add polarity and phase to FourWire.
2020-03-28 07:28:37 -05:00
Scott Shawcroft a870908718
Don't break the function signature 2020-03-26 14:11:20 -07:00
siddacious 9e0c00dfd4 adding a backlight polarity flag to Display 2020-03-25 22:51:20 -07:00
Scott Shawcroft 8a5d3cd6c4
Add exception on small buffer and fix Connecion WRITE handling 2020-03-25 17:41:47 -07:00
Scott Shawcroft 6b7acc65b6
Add polarity and phase to FourWire.
It was fixed as 0/0 even though it used to get it from the current
SPI state. This makes it more explicit with kwargs.

Thanks to magpie_lark and kmatocha on the Adafruit Support forum
for finding the issue: https://forums.adafruit.com/viewtopic.php?f=60&t=162515
2020-03-25 11:22:46 -07:00
Jeff Epler aaf07ce72f
Update shared-bindings/ulab/__init__.rst
Co-Authored-By: Scott Shawcroft <scott@tannewt.org>
2020-03-17 16:37:16 -05:00
Jeff Epler aa54a7e76e ulab: update documentation 2020-03-17 09:25:33 -05:00
Dale Hawkins 8ae103e07c
Fix documentation typo: tm_minute should be tm_min 2020-03-16 09:07:10 -06:00
Dan Halbert fdcdc1320b Make ParallelBus reset ping arg required 2020-03-06 14:30:30 -05:00
Dan Halbert 210c3274e5 Merge remote-tracking branch 'adafruit/master' into assert_pin-and-mp_const_none-cleanup 2020-03-05 17:47:01 -05:00
Dan Halbert 817b5be320 rename routines to be clearer; fix wiznet arg types 2020-03-05 16:35:31 -05:00
Dan Halbert e30b1d3121 missing semicolon 2020-02-29 22:48:11 -05:00
Dan Halbert 8435935429 update uses of assert_pin_free; remove redundant checks 2020-02-29 15:37:32 -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
Jeff Epler 39cfe32c34 Update ulab from upstream again 2020-02-27 14:14:05 -06:00
Jeff Epler 645df931ae typos 2020-02-27 11:07:37 -06:00
Jeff Epler fa3b9eba92 ulab: Incorporate it 2020-02-27 11:03:03 -06:00
Dan Halbert e31ac710be Enable _bleio adapter when _bleio is imported 2020-02-20 21:55:04 -05:00
Dave Marples d388899985 Addition of RS485 support 2020-02-18 23:16:40 +00:00
Dave Marples 84ad3d8393 Addition of RTS/CTS/RS485 UART functionality 2020-02-18 23:16:40 +00:00
Scott Shawcroft 52d96ca151
Merge pull request #2626 from dhalbert/stat-for-shortint
avoid os.stat() int overflow on smallint-only builds
2020-02-18 13:40:52 -08:00
Dan Halbert e0753c4ad2 avoid os.stat() int overflow on smallint-only builds 2020-02-14 18:33:37 -05:00
Melissa LeBlanc-Williams 33774e790c Updated OnDiskBitmap RTD example for 5.x 2020-02-14 10:23:23 -08:00
Scott Shawcroft e97b0cfc61
Merge pull request #2581 from jamesbowman/master
First draft of eveL, the low-level module of the Gameduino bindings
2020-02-13 11:21:32 -08:00
James Bowman b02937d1a7 Split ROMDECLS for readability 2020-02-13 07:28:21 -08:00
Dan Halbert c57ccd5eb4 doc typo 2020-02-11 20:03:47 -05:00
Dan Halbert f73b58a2c6 fix doc indentation 2020-02-11 19:57:48 -05:00
Dan Halbert 2e029d55fc nrf: add SPIM3 support 2020-02-11 19:22:14 -05:00
James Bowman a87dee2f66 Correct the BitmapTransform operations.
Correct argument order
better argument naming
fix copypaste bug on C and F arguments
2020-02-10 19:34:38 -08:00
James Bowman 1f44029c56 Remove unused code 2020-02-10 18:57:04 -08:00
James Bowman f101ff60c5 Move _eve module declarations into shared-bindings header 2020-02-07 17:10:19 -08:00
James Bowman c631b4d60e Add doc strings, inline mod_eve-gen.h and remove it 2020-02-07 16:44:48 -08:00
James Bowman 5c6d94d3e5 Split into shared-module and shared-bindings 2020-02-07 10:30:49 -08:00
Dan Halbert cbd519bfa6 time.sleep() rounds to nearest msec 2020-02-07 10:24:11 -05:00
Dan Halbert 857d8ab40a improve time.monotonic_ns() accuracy from ms to us 2020-02-07 10:02:50 -05:00
James Bowman a20490c0b3 Add method VertexFormat() and variable fixed-point scaling in Vertex2f() 2020-02-06 08:49:07 -08:00
James Bowman acef93a253 Rename eveL to _eve, EVEL to _EVE 2020-02-05 18:17:58 -08:00
James Bowman a9b34f45dc My name 2020-02-05 18:01:25 -08:00
James Bowman 53f7e2be4f Use mp_instance_cast_to_native_base() throughout 2020-02-05 17:58:59 -08:00
Dan Halbert a4ebd2f7c1 allow tuple or list for Palette color 2020-02-03 22:09:53 -05:00
James Bowman 0bcfabbc87 Add header for module eveL explaining what it is.
Exclude modeveL-gen.h from Sphinx build
2020-02-03 18:41:32 -08:00
James Bowman 7fd30e7d20 First draft of eveL, the low-level module of the Gameduino (and BridgeTek EVE) bindings.
[adafruit/circuitpython#2578]
2020-02-03 16:46:14 -08:00
Scott Shawcroft 55eb1730b8
Merge remote-tracking branch 'adafruit/master' into tweak_pixelbuf 2020-01-30 10:59:21 -08:00
Radomir Dopieralski 27c36eea2b circuitpython-stage: allow choosing background color 2020-01-30 15:24:04 +01:00
Scott Shawcroft 5d24ade5c9
Tweak error messages to reduce code size. 2020-01-29 17:32:07 -08:00
Dan Halbert e21580b67f PacketBuffer.packet_size was returning bool instead of int 2020-01-27 17:10:56 -05:00
Scott Shawcroft 39971794dd
Encapsulate buffers inside PixelBuf and refactor it. 2020-01-24 18:23:07 -08:00
Dan Halbert 2a75196aa3 merge from adafruit/circuitpython 2020-01-13 18:15:32 -05:00
Dan Halbert 9e7f8743c2 fix CCCD bonding store; avoid excessive bonding writes 2020-01-12 23:32:51 -05:00
Dan Halbert 346ce3b73b wip: HID bonding works! 2020-01-10 23:55:45 -05:00
Scott Shawcroft 8708d3dc45
Merge pull request #2461 from jepler/urandom-hardfaults
Urandom hardfaults
2020-01-10 11:37:59 -08:00
Dan Halbert 9c167af17a wip; redid flash writing to be compatible with SD 2020-01-09 17:40:02 -05:00
Scott Shawcroft a10cd8580c
Merge pull request #2445 from jepler/mp3-jeplayer-fixes
Fixes for JEplayer
2020-01-08 12:50:13 -08:00
Jeff Epler 6735283d8f os: Don't require an on-stack buffer
This allows urandom requests of even 100k bytes to succeed on a fresh
VM session on a Metro M4 express.
2020-01-08 09:43:13 -06:00
Jeff Epler b1b4a9e842 fix doc build error 2020-01-06 09:26:32 -06:00
Jeff Epler dc729718eb audiomp3: rename to MP3Decoder 2020-01-06 07:51:41 -06:00
Scott Shawcroft 82fb761c0f
Add PacketBuffer and MTU negotiation support.
PacketBuffer facilitates packet oriented BLE protocols such as BLE
MIDI and the Apple Media Service.

This also adds PHY, MTU and connection event extension negotiation
to speed up data transfer when possible.
2020-01-03 17:29:54 -08:00
Dan Halbert fc5f776429
Merge pull request #2034 from rhooper/new-pixelbuf-api
Updates to pixelbuf API - Addresses #884
2020-01-03 17:19:02 -05:00
Roy Hooper 767ce1cdf8 remove unnecessary GCC pragmas 2020-01-02 18:03:18 -05:00
Roy Hooper ccf158b030 raise mp_raise_NotImplementedError 2020-01-02 18:00:36 -05:00
Roy Hooper fdddb54db4 rename call_show to pixelbuf_call_show 2020-01-02 17:56:04 -05:00
Jeff Epler ec22520992 MP3File: Add rms_level property
This lets a music player show it vu-meter style
2020-01-02 15:23:42 -06:00
Roy Hooper 4e1996856f Fix docstring for byteorder 2020-01-01 19:25:44 -05:00
Roy Hooper 12193913a8 move native fill to a helper to work around being unable to call a subclass show method from the native superclass 2020-01-01 17:30:17 -05:00
Roy Hooper 8129a8503a Revert "try a property with a callable static class"
This reverts commit ca5b2770cf.
2020-01-01 16:10:22 -05:00
Roy Hooper ca5b2770cf try a property with a callable static class 2020-01-01 16:10:01 -05:00
David Glaude 01d49eb0a7
Update Shape.c
Make no sense to say this is experimental and will change in 4.0.0 when we are already above 4.0.0.
This should be removed, or updated to say it will not be in x.0.0
2019-12-30 16:54:16 +01:00
Roy Hooper 023d64fe4a Merge branch 'pixelbuf-subscr-change' into new-pixelbuf-api 2019-12-29 13:56:47 -05:00