Robert Fisk
950b747906
Fix LED includes
5 years ago
Robert Fisk
1277532140
Implement read/write indication on the fault LEDs
...
Conflicts:
Downstream/Inc/build_config.h
Downstream/Src/downstream_msc.c
Downstream/Src/led.c
Upstream/Inc/build_config.h
Upstream/Src/led.c
5 years ago
Robert Fisk
151ae57b14
Wait for phantom Connect interrupts to finish before completing
...
Disconnect processing
Conflicts:
Downstream/Middlewares/ST/STM32_USB_Host_Library/Core/Src/usbh_core.c
5 years ago
Robert Fisk
9e4225fe36
Poll mass storage for disconnection while suspended - fix for Windows
...
'safely remove' function.
5 years ago
Robert Fisk
65aa7da843
Correctly handle reads/writes after stop command issued.
...
Also correctly report device disconnection if Upstream polls too slowly.
Conflicts:
Downstream/Src/downstream_statemachine.c
Upstream/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c
5 years ago
Robert Fisk
16e964702a
Implemented Stop/Eject command passthrough
...
Conflicts:
Downstream/.cproject
Downstream/Inc/downstream_interface_def.h
Downstream/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src/usbh_msc.c
Downstream/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src/usbh_msc_scsi.c
Downstream/Src/downstream_msc.c
Upstream/Inc/upstream_interface_def.h
Upstream/Inc/upstream_msc.h
Upstream/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c
Upstream/Src/upstream_msc.c
5 years ago
Robert Fisk
4c4f59d638
Delay GetMaxLUN command by 100ms.
...
Conflicts:
Downstream/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src/usbh_msc.c
5 years ago
Robert Fisk
e2292aeba5
Don't spam device while waiting for MSC unit ready
...
Conflicts:
Downstream/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src/usbh_msc.c
5 years ago
Robert Fisk
992baa7e9d
Retry control requests for slow flash drives
...
Conflicts:
Downstream/Middlewares/ST/STM32_USB_Host_Library/Core/Src/usbh_ctlreq.c
5 years ago
Robert Fisk
ecd0ecaf06
Fix project settings for .bin file generation
6 years ago
Robert Fisk
c3738a8657
Create .bin file in post-build project setting
6 years ago
Robert Fisk
0a77b5c74d
Don't overwrite array bounds when mass storage device reports > 2 LUNs
7 years ago
Robert Fisk
0f1948f8c4
Tweak HID protocol defines
7 years ago
Robert Fisk
f1f414a352
Eclipse launch configurations changed for some reason
7 years ago
Robert Fisk
312c708409
Fix for mechanical keyboards sending > 8 byte packets
7 years ago
Robert Fisk
91126cef4f
Fixed eclipse project settings & debug configurations
...
Conflicts:
Downstream/.cproject
Downstream/Downstream Debug.launch
Downstream/Downstream Release.launch
Upstream/.settings/language.settings.xml
Upstream/Upstream Debug.launch
Upstream/Upstream Release.launch
7 years ago
Robert Fisk
7037aa6052
Better support for multi-interface HID: Logitech unifying receivers
...
- Select mouse interface first
- Correctly specify active interface when retrieving HID descriptors
7 years ago
Robert Fisk
688f2e673c
Support HID mouse reports with an ID header (Lenovo)
7 years ago
Robert Fisk
bdcb77cabb
Initial implementation of mouse bot detection
...
Conflicts:
Downstream/.cproject
Upstream/.cproject
Upstream/.settings/language.settings.xml
7 years ago
Robert Fisk
bd40794d50
HID BotDetect functionality debugged and working:
...
- Implement advanced LED flash support
- Tweak HAL_SPI_TransmitReceive to tolerate a longer SysTick interrupt
- Tune KEYBOARD_BOTDETECT parameters
- L-shift and R-shift are now high-speed alphanumeric keys
7 years ago
Robert Fisk
19f91b391d
Build options complete & tested:
...
- Implement SCSI WP flag in mode parameter header
- Refactor #ifdef names
- #ifdef out more HID code
7 years ago
Robert Fisk
81f7efbca7
Implemented read-only option (Downstream only)
7 years ago
Robert Fisk
5c9dde896c
Implemented optional build for mass storage, keyboard, and mouse
...
features.
Conflicts:
Upstream/.settings/language.settings.xml
7 years ago
Robert Fisk
040bf9eee0
Fixed devices-shrinking-by-one-block problem.
...
So it turns out the SCSI ReadCapacity10 command does not return the
device capacity. It returns the address of the last block, which is
(capacity - 1).
Also fixed Upstream's end-of-device sanity check.
8 years ago
Robert Fisk
f51ae234c6
Fix for the previous fix. This time for sure.
...
Previously we wrote 4 x 64 byte transactions to the downstream device.
This is fast, but very occasionally the USB host silicon would bug out.
Reverting to single 64 byte write transactions increases reliability at
the expense of some write speed.
8 years ago
Robert Fisk
6697c9fea4
Another fix for occasional mass storage write freakouts.
...
USB host controller sometimes incorrectly reports number of TX packets
in queue.
8 years ago
Robert Fisk
835c54f480
Fix for occasional freakouts on mass storage writes.
...
Upstream's edge-detect interrupt that starts SPI transmission was not
firing. Sometimes. On some boards only. The cause was Downstream not
allowing enough time between edges for Upstream to catch the signal.
Also misc code tidyups.
8 years ago
Robert Fisk
61df3e14e6
Meaningless update to project settings file
8 years ago
Robert Fisk
a3ba77433f
Startup LED flash is now asynchronous.
...
Not only a faster startup process, but also catches some HID devices
that only work if initialised within 500ms of powerup.
8 years ago
Robert Fisk
000841f6e8
Refactor and improve HID report item parsing
8 years ago
Robert Fisk
408c84ac00
Correctly parse HID report descriptor items with unusual lengths.
...
Thanks Logitech.
8 years ago
Robert Fisk
e3ddf162ee
So I tested this innocent-looking Transcend flash drive...
...
It will sometimes NAK part-way through a multi-packet OUT URB. And what
it wants is for the host to resend beginning from the last even-numbered
packet. NOT the last packet it received, and NOT the beginning of that
URB.
8 years ago
Robert Fisk
19bb191029
Don't fail if device stalls on SetIdle command (*cough* Logitech mice)
8 years ago
Robert Fisk
1f144d6cab
Bugfixes for keyboard support: works!!!
8 years ago
Robert Fisk
e78c526cb8
Keyboard support implemented, but not tested
8 years ago
Robert Fisk
34b152cce9
Incomplete and untested implementation of keyboard support
...
Conflicts:
Upstream/Upstream Debug.launch
8 years ago
Robert Fisk
87a26b3e60
Fix for occasional problem when attaching mouse after powerup.
...
It turned out we were getting a "device disconnected" interrupt while
waiting for the port to enable following reset. Simply ignoring the
disconnect interrupt allows everything to work! WTF...
8 years ago
Robert Fisk
b760f5fc9d
Fix for occasional timeout on writes...
...
...Downstream was not always changing state correctly after closely
spaced interrupts.
Also improve flash-write-lockout function to avoid dependency on
optimisation level.
Conflicts:
Upstream/Src/interrupts.c
8 years ago
Robert Fisk
c84b1ef0c3
Tweak USB middleware to avoid compiler warning
8 years ago
Robert Fisk
b3e3931b75
Minor fix for startup hardware-detection function
8 years ago
Robert Fisk
d0c41d7d29
Ignore Mass Storage subclass, and try to talk with transparent SCSI
...
anyway. This may or may not be helpful!
8 years ago
Robert Fisk
b96c539088
Implemented FIFO support in Downstream host, significant speed increase!
...
Each USB transaction passed to the driver now consists of multiple
64-byte packets. 8 packets when receiving, 4 packets when transmitting.
The STM32 silicon bugs out when more than 4 packets are scheduled to
write at a time :(
Reads 1.0MB/sec, writes 967kB/sec, not CPU limited :)
8 years ago
Robert Fisk
7e073a091d
Sleep instead of busy-wait, approx 50% power reduction!
8 years ago
Robert Fisk
b30b82e27b
Improve HID parser error checking
9 years ago
Robert Fisk
b8f10b6496
Improve handling of >8bit input values
9 years ago
Robert Fisk
639464493b
Improved HID report parser compatibility
9 years ago
Robert Fisk
655b0e56a8
Support disconnect/reconnect of attached HID device
9 years ago
Robert Fisk
056932d6bc
HID report parser now handles collections.
9 years ago
Robert Fisk
4b9607dbc3
HID parser and wheel support works!
9 years ago
Robert Fisk
35d54056c4
Implemented HID report parser. Untested!
9 years ago