Commit Graph

34 Commits

Author SHA1 Message Date
Scott Shawcroft 9d10a3da66
Conditionalize LTO 2022-05-27 12:59:54 -07:00
Scott Gauche 3b418dbddc change half_duplex to be on spi construct 2022-02-08 21:37:38 -05:00
Dan Halbert 25707d311a Track creation of board.I2C(), etc. 2022-01-30 23:20:51 -05:00
microDev 30c0891fba
cleanup post instance parameter removal 2022-01-20 20:07:42 +05:30
microDev b6858e4ca7
allow multiple board buses
Co-authored-by: Neradoc <neraOnGit@ri1.fr>
2021-12-11 23:07:21 +05:30
Jeff Epler 621953c960
Additional missing-prototypes fixes
I think this correctly enables missing-prototypes in atmel-samd
and raspberrypi ports.
2021-11-10 10:55:53 -06:00
Dan Halbert 5a9b95e611 unlock board.I2C() on reset 2021-05-21 17:49:50 -04:00
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Dan Halbert fa34b8a404 correct clock stretch timeout for board.I2C() 2021-03-11 21:02:07 -05:00
Christian Walther 99a3750a2c Fix lost board.SPI and board.I2C after explicitly deiniting them.
After calling board.SPI().deinit(), calling board.SPI() again would return the unusable deinited object and there was no way of getting it back into an initialized state until the end of the session.
2020-10-26 22:44:38 +01:00
Christian Walther f4f80e07ca Fix lost board.SPI and board.I2C after being used by display.
Fixes #3581.

Pins were marked as never_reset by common_hal_displayio_fourwire_construct() and common_hal_sharpdisplay_framebuffer_construct(), but these marks were never removed, so at the end of a session after displayio.release_displays(), {spi|i2c}_singleton would be set to NULL but the pins would not be reset. In the next session, board.SPI() and board.I2C() were unable to reconstruct the object because the pins were still in use.

For symmetry with creation of the singleton, add deinitialization before setting it to NULL in reset_board_busses(). This makes the pins resettable, so that reset_port(), moved behind it, then resets them.
2020-10-26 22:44:38 +01:00
Christian Walther 1117edae63 Fix erroneous claim of board.I2C() by deinited display.
At the end of a session that called displayio.release_displays() (and did not initialize a new display), a board.I2C() bus that was previously used by a display would wrongly be considered still in use. While I can’t think of any unrecoverable problem this would cause in the next session, it violates the assumption that a soft reboot resets everything not needed by displays, potentially leading to confusion.

By itself, this change does not fix the problem yet - rather, it introduces the same issue as in #3581 for SPI. This needs to be solved in the same way for I2C and SPI.
2020-10-26 22:44:38 +01:00
Scott Shawcroft a739d314f1
Add Metro ESP32S2
Also fix two bugs:
* Crash when resetting board.SPI when it hasn't been inited.
* Reading back the output value is always false. Fixes #3353
2020-09-30 12:57:39 -07:00
Scott Shawcroft b9d68bc5a6
Change I2C default to 100khz
Greater that 100khz is technically out of the original spec.

Background here: https://github.com/adafruit/Adafruit_CircuitPython_CLUE/issues/36
2020-09-25 11:07:22 -07:00
root 870326b221 Moved SPI unlock code 2020-09-11 10:54:46 -05:00
root 59165cabbe Removed unneeded pointer 2020-09-09 10:36:55 -05:00
root 24a18c63f9 Moved SPI unlock to reset_board_busses() 2020-09-09 09:32:25 -05:00
root 8d27533cd4 Make sure SPI lock is free initially 2020-09-06 18:03:25 -05:00
Jeff Epler 9e66f71a31 Fix build error for \!DISPLAY 2020-08-18 10:03:45 -05:00
Jeff Epler b542c1486f reset_board_buses: need to check if sharpdisplay uses SPI bus 2020-08-18 09:32:28 -05:00
Scott Shawcroft a26102607e
Add UART support 2020-06-24 12:47:58 -07:00
Mark Olsson 007c92ee6a Enable showing the console on a debug uart 2020-05-19 02:02:52 +02: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
Dave Marples d41cf2e926 Fix incorrect initialisation of default UART 2020-02-23 11:16:24 +00: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
Dan Halbert b32a9192df make UART.write be blocking on SAMD; add timeout property 2019-11-27 13:05:29 -05:00
Scott Shawcroft b3de7efc07
Fix I2CDisplay lifecycle and splash lifecycle.
Fixes https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306/issues/2
2019-08-14 15:53:58 -07:00
Hierophect 58630a844a Add feature conditionals and clean up 2019-07-22 12:58:28 -04:00
Hierophect 43e8a4110f Add missing files for DigitalIO 2019-07-17 14:18:01 -04:00
Dan Halbert 62de2506e4 Include display objects in gc. 2019-06-06 17:49:32 -04:00
Scott Shawcroft 72992070c5
Fix boards with no shared busses. 2019-04-09 11:36:10 -07:00
Scott Shawcroft ac7822ba4c
Delete stale TODO 2019-04-08 17:37:30 -07:00
Scott Shawcroft 0f003ac5b8
Reorganize board busses into shared-bindings and shared-module. 2019-04-08 16:58:50 -07:00