Commit Graph

28 Commits

Author SHA1 Message Date
Timon a1052d5f73
Initial broadcom port for Raspberry Pi
This targets the 64-bit CPU Raspberry Pis. The BCM2711 on the Pi 4
and the BCM2837 on the Pi 3 and Zero 2W. There are 64-bit fixes
outside of the ports directory for it.

There are a couple other cleanups that were incidental:
* Use const mcu_pin_obj_t instead of omitting the const. The structs
  themselves are const because they are in ROM.
* Use PTR <-> OBJ conversions in more places. They were found when
  mp_obj_t was set to an integer type rather than pointer.
* Optimize submodule checkout because the Pi submodules are heavy
  and unnecessary for the vast majority of builds.

Fixes #4314
2021-11-22 14:54:44 -08:00
EmergReanimator f2e3231c46 resolves #4153: Fixed build issue when CIRCUITPY_USB is off 2021-06-04 10:12:50 +02:00
Scott Shawcroft 3fda0c0a1b
Fix board builds and use MP_ERROR_TEXT in py and extmod 2021-05-05 17:51:52 -07:00
Artyom Skrobov 4e3c1d4a4c [build] Allow USB to be set to 0
Unify USB-related makefile var and C def as CIRCUITPY_USB.

Always define it as 0 or 1, same as all other settings.

USB_AVAILABLE was conditionally defined in supervisor.mk,
but never actually used to #ifdef USB-related code.

Loosely related to #4546
2021-04-23 11:13:34 -04:00
microDev bd95914e88
implement function to check usb connection 2021-03-18 10:00:01 +05:30
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Dan Halbert f0564b4986 merge from upstream; complicated webusb merge 2021-02-11 18:50:02 -05:00
Dan Halbert 1b7f3d11e7 wip 2021-02-08 10:57:41 -05:00
Dan Halbert f868cc5dd0 some API renaming and bug fixes; fix docs 2020-11-24 23:37:05 -05:00
Dan Halbert 7a45afc549 working, but need to avoid deep sleeping too fast before USB ready 2020-11-23 22:44:53 -05:00
Dan Halbert a0f1ec3c4a wip 2020-11-22 19:10:09 -05:00
Dan Halbert 75559f35cc wip: ResetReason to microcontroller.cpu 2020-11-21 23:29:52 -05:00
Scott Shawcroft 85dadf3a56
More API changes 2020-10-27 16:18:39 -07: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
Taku Fukada d356581651 Fix several type hints 2020-07-27 18:05:13 +09: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 54cb1feea0 Removed all 'self, )' 2020-07-02 13:28:36 -04:00
Scott Shawcroft 4e8de3c554
Swap sphinx to autoapi and the inline stubs 2020-05-12 17:28:24 -07:00
dherrada 991045b9ce
Did struct, supervisor, terminalio 2020-05-12 11:28:33 -04:00
Dan Halbert b6b5ed9c89 Remove nRF52832 support 2018-12-30 22:49:20 -05:00
Scott Shawcroft 0688709c4f
Move the docs next to the implementation 2018-10-09 23:15:25 -07:00
ATMakersBill 05d4b8cf50 Added Documentation for the serial_bytes_available attribute 2018-10-09 22:50:59 -04:00
ATMakersBill 9f94712ad1 replacing change to input() with separate method to check for USB Serial input 2018-10-09 18:37:52 -04:00
sommersoft d1974e0038 supervisor/Runtime: updated documentation for 'no disconnect' 2018-04-06 01:56:51 +00:00
sommersoft 2569b33c84 1 more sphinx fix; added '.. class::' constructor 2018-03-09 21:00:15 +00:00
sommersoft f21038b913 sphinx fix; incorrect currentmodule ref 2018-03-09 20:24:07 +00:00
sommersoft c1c3a79ec4 atmel-samd: changed Status to Runtime; instituted runtime singleton 2018-03-09 02:19:51 +00:00