Commit Graph

13 Commits

Author SHA1 Message Date
Scott Shawcroft
83593a1558
Start of USB host API
This allows you to list and explore connected USB devices. It
only stubs out the methods to communicate to endpoints. That will
come in a follow up once TinyUSB has it. (It's in progress.)

Related to #5986
2022-03-07 18:07:25 -08:00
Jeff Epler
ac978969f7
litex: Enable -Werror=missing-prototypes 2021-11-12 19:13:51 -06:00
microDev
a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Sean Cross
f3e54414e5 litex: ensure we don't re-enable interrups during ISR
During an interrupt handler, interrupts are implicitly disabled. They
will be re-enabled when the interrupt handler returns.

Due to some changes that were made, varous calls will re-enable
interrupts after they're finished. Examples of this include calling
`CALLBACK_CRITICAL_END` and getting the number of ticks with
`port_get_raw_ticks()`.

This patch prevents this from happening by doing two things:

1. Use standard calls in `port_get_raw_ticks()` to disable and re-enable
interrupts, preventing nesting issues, and
2. Increase the nesting count inside `isr()`, reflecting the implicit
call that is made by hardware when an interrupt is handled

This helps to address #3841.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-12-24 14:03:10 +08:00
Jeff Epler
6160d11c5a supervisor: factor out, Handle USB via background callback 2020-07-15 11:49:44 -05:00
Scott Shawcroft
755d404edf
Merge remote-tracking branch 'adafruit/master' into lower_power 2020-04-27 16:45:10 -07:00
Scott Shawcroft
67c053e9c4
Add USB include for LiteX 2020-04-24 17:24:05 -07:00
Scott Shawcroft
5c7f6e6211
Remove empty #if and add missing includes. 2020-04-24 11:48:55 -07:00
Scott Shawcroft
5cc8a3ec82
Add back fake us delay. 2020-04-21 14:14:49 -07:00
Scott Shawcroft
7e3d4c61b5
Update TinyUSB and add interrupt hooks. 2020-04-17 14:16:49 -07:00
Sean Cross
6885ffc9af litex: mphalport: add fake mp_hal_delay_us
Add a mp_hal_delay_us, which is required by some of the modules,
that simply calls mp_hal_delay_ms / 1000.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-16 09:26:08 +08:00
Scott Shawcroft
75b7f583d2
Update LiteX APIs for new tick 2020-03-31 17:52:23 -07:00
Sean Cross
786e79ebc9 ports: litex: add port and fomu board
This adds support for Litex, along with support for the Fomu FPGA board.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-31 09:40:38 +08:00