Commit Graph

1269 Commits

Author SHA1 Message Date
Jeff Epler 9e8f1820c8 canio.CAN: switch rx/tx, make both mandatory, move declarations around 2020-09-21 16:44:26 -05:00
Jeff Epler fd9df164c0 canio: Message: remove size property
This is just duplicating what len(message.data) gives you.
2020-09-21 16:44:26 -05:00
Jeff Epler 7fd6cab2ac canio: Make both tx and rx (but not both) optional
.. loopback and silent come from the (optional) constructor parameters
not guessing based on the pin specification

.. docstring & comment improvements
2020-09-21 16:44:26 -05:00
Jeff Epler c39ec1581e _canio: Message: setting data clears rtr, and vice versa 2020-09-21 16:44:26 -05:00
Jeff Epler 44c5b2bbb1 Respond to review comments
Thanks @tannewt!
2020-09-21 16:44:26 -05:00
Jeff Epler a69b298aed Whitespace 2020-09-21 16:44:26 -05:00
Jeff Epler 27cbb690e5 _canio: Add listener matching
Lightly tested:
 * no matches (catch-all)
 * standard address single address matches (even and odd positions)
 * standard address mask matches
 * only tested that extended doesn't match non-extended
2020-09-21 16:44:26 -05:00
Jeff Epler 2cb4707f92 Message: add extended address flag 2020-09-21 16:44:26 -05:00
Jeff Epler 40d4a69133 more doc improvements 2020-09-21 16:44:26 -05:00
Jeff Epler 1eb0587917 correct docstring 2020-09-21 16:44:26 -05:00
Jeff Epler 635fcadb59 _canio.CAN: add error handling & bus state 2020-09-21 16:44:26 -05:00
Jeff Epler f8dcf2118e _canio: Add _canio.State enum-like class 2020-09-21 16:44:26 -05:00
Jeff Epler 37af9dde90 Listener: fix doc markup, include in globals of its module 2020-09-21 16:44:26 -05:00
Jeff Epler a2e1867f69 _canio: Minimal implementation for SAM E5x MCUs
Tested & working:

 * Send standard packets
 * Receive standard packets (1 FIFO, no filter)

Interoperation between SAM E54 Xplained running this tree and
MicroPython running on STM32F405 Feather with an external
transceiver was also tested.

Many other aspects of a full implementation are not yet present,
such as error detection and recovery.
2020-09-21 16:44:26 -05:00
Dan Halbert dfd09bba57
Merge pull request #3433 from astrobokonon/esp32s2-bssid
ESP32S2: Allow connecting to specific bssid
2020-09-18 21:31:15 -04:00
Jeff Epler 28043c94b5 supervisor: Improve serial connection detection
These changes remove the caveat from supervisor.runtime.serial_connected.

It appears that _tud_cdc_connected() only tracks explicit changes to the
"DTR" bit, which leads to disconnects not being registered.

Instead:
 * when line state is changed explicitly, track the dtr value in
   _serial_connected
 * when the USB bus is suspended, set _serial_connected to False

Testing performed (using sam e54 xplained):  Run a program to show
the state of `serial_connected` on the LED:
```
import digitalio
import supervisor
import board

led = digitalio.DigitalInOut(board.LED)
while True:
    led.switch_to_output(not supervisor.runtime.serial_connected)
```

Try all the following:
 * open, close serial terminal program
    - LED status tracks whether terminal is open
 * turn on/off data lines using the switchable charge-only cable
    - LED turns off when switch is in "charger" position
    - LED turns back on when switch is in Data position and terminal is
      opened (but doesn't turn back on just because switch position is
      changed)
2020-09-17 18:32:06 -05:00
Ryan T. Hamilton 1e3241ec6d
Merge branch 'main' into esp32s2-bssid 2020-09-16 17:15:01 -07:00
Ryan T. Hamilton daa1dd278d connect now accepts bssid 2020-09-16 16:25:17 -07:00
Dan Halbert d774678a0f
Merge pull request #3369 from kamtom480/camera
Add camera module
2020-09-16 12:29:58 -04:00
Kamil Tomaszewski 61687c81d8 camera: Pass width and height to take_picture() 2020-09-16 13:55:57 +02:00
Ryan T. Hamilton fead60d2d8 Add BSSID to Network 2020-09-15 23:32:53 -07:00
Scott Shawcroft 3d8bac50e4
Merge pull request #3397 from tannewt/fix_size_0_bug
Fix bug with socket.recv_into size == 0.
2020-09-14 14:47:28 -07:00
Kamil Tomaszewski ce7ee58e92 camera: Update camera module 2020-09-14 13:12:20 +02:00
Kamil Tomaszewski c2fc592c2c camera: Change API 2020-09-14 13:11:15 +02:00
Kamil Tomaszewski 064c597b60 camera: Implement new library for camera 2020-09-14 13:11:15 +02:00
Jeff Epler a81a2cff02
Merge pull request #3411 from jepler/ble-doc-typo
_bleio: fix markup typo
2020-09-13 12:50:12 -05:00
Jeff Epler e5122b1acf _bleio: fix markup typo 2020-09-13 11:56:34 -05:00
Carl Karsten 2f058029e9 doc fix: remove the text about the non-existing clock specification 2020-09-12 15:25:04 -05:00
Scott Shawcroft 8f58669ddd
Fix bug with socket.recv_into size == 0.
It returned 0 when it should have filled the buffer.

Python reference: https://docs.python.org/3/library/socket.html#socket.socket.recv_into
2020-09-11 16:17:20 -07:00
Scott Shawcroft 9256e6b376
Merge pull request #3302 from xiongyihui/main
support to get HID OUT report
2020-09-10 17:35:04 -07:00
Dan Halbert f0bb9635bf
MIssed one change for .last_received_report 2020-09-10 14:21:36 -04:00
Dan Halbert 40f3cd3615
Change `.report` to `.last_received_report` 2020-09-10 13:26:51 -04:00
Scott Shawcroft 96cf60fbbd
Merge remote-tracking branch 'adafruit/main' into native_wifi 2020-09-03 16:34:56 -07:00
Scott Shawcroft 0b94638aeb
Changes based on Dan's feedback 2020-09-03 16:32:12 -07:00
Scott Shawcroft 5d17d6402d
Merge pull request #3366 from kmatch98/refresh_now
Update refresh to force immediate redraw with `display.refresh()`
2020-09-02 16:37:46 -07:00
Scott Shawcroft 786f4ed114
Merge pull request #3344 from jepler/issue-3184
Fix RGBMatrix, FrameBufferDisplay bugs
2020-09-02 15:32:30 -07:00
Jeff Epler 17a5a85528 rgbmatrix: Move struct definition to shared-module, rename 'core' member 2020-09-02 13:34:16 -05:00
Kevin Matocha d224183a7e Delete trailing whitespace 2020-09-02 11:26:37 -05:00
Kevin Matocha 8256bf7ea6 Add backticks to function references in docs 2020-09-02 11:20:30 -05:00
Kevin Matocha 4b9306aa7c Cleanup for sphinx 2020-09-01 18:10:40 -05:00
Kevin Matocha 554cc356db Delete trailing whitespace 2020-09-01 15:43:18 -05:00
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