Commit Graph

4 Commits

Author SHA1 Message Date
Lephe fc1f510288
usb: consolidate reading mode (basic multi-segment reads now working) 2023-03-12 17:53:44 +01:00
Lephe c59b2f90fb
usb: prototype reading mode
Currently only tested with short messages using the fxlink interface.
There is much to be expanded upon, but this is a worthy start.
2023-03-04 18:06:38 +01:00
Lephe 6910714c2c
asyncio: remove unused field asyncio_op_t.flying_w 2023-02-16 16:09:53 +01:00
Lephe af5c16a3d3
usb: massively improve writing logic
* Move logic around tracking transfers to asyncio.c.

* Add a "short buffer" holding 0-3 bytes between writes, so that the
  driver performs only 4-byte writes in the FIFO and a short write in
  the commit, if needed.
  - This is partially due to me thinking at some point that degrading
    writing size was impossible, but it might actually be possible by
    writing to FIFO/FIFO+2 or FIFO/FIFO+1/FIFO+2/FIFO+3.
  - In any case I think this new approach wins on performance.

* Get rid of unit_size since we now always use 4 bytes.

* Add a waiting function which is used in usb_close() (and once tested
  should be used in world switches too).

* Eliminate some of the special cases for the DCP, though not all (in
  particular I can't get the commit to rely on the BEMP interrupt yet,
  nor can I properly clear PID to NAK when unbinding).
2023-02-09 23:00:44 +01:00
Renamed from src/usb/asyncio.h (Browse further)