Robert Fisk
3d5127784d
Fix LED includes
5 years ago
Robert Fisk
bbad577d43
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
828db8e415
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
34bfe421b5
Poll mass storage for disconnection while suspended - fix for Windows
...
'safely remove' function.
5 years ago
Robert Fisk
92d29f0901
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
1147d2ebf9
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
1ea38b2150
Delay GetMaxLUN command by 100ms.
...
Conflicts:
Downstream/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src/usbh_msc.c
5 years ago
Robert Fisk
f0fcead718
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
23e0214d52
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
45cab8485c
Fix project settings for .bin file generation
6 years ago
Robert Fisk
ee148998b9
Create .bin file in post-build project setting
6 years ago
Robert Fisk
8f1d3d9a72
Don't overwrite array bounds when mass storage device reports > 2 LUNs
7 years ago
Robert Fisk
3276449378
Tweak HID protocol defines
7 years ago
Robert Fisk
c06a875050
Eclipse launch configurations changed for some reason
7 years ago
Robert Fisk
c34e0eec59
Fix for mechanical keyboards sending > 8 byte packets
7 years ago
Robert Fisk
3e68c42e45
Fixed eclipse project settings & debug configurations
7 years ago
Robert Fisk
d7f66cd393
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
c55b525c41
Support HID mouse reports with an ID header (Lenovo)
7 years ago
Robert Fisk
324f115476
Implement mouse acceleration pulse timing. Doesn't work on realistic
...
inputs.
7 years ago
Robert Fisk
f7b7ce84e7
Initial implementation of mouse bot detection
7 years ago
Robert Fisk
fa00fd95dd
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
cf1d5da8e8
Build options complete & tested:
...
- Implement SCSI WP flag in mode parameter header
- Refactor #ifdef names
- #ifdef out more HID code
8 years ago
Robert Fisk
7cf9b67d1f
Implemented read-only option (Downstream only)
8 years ago
Robert Fisk
53fea530aa
Implemented optional build for mass storage, keyboard, and mouse
...
features.
8 years ago
Robert Fisk
b476df268a
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
e2404109a2
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
7022b16a71
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
a287c39b84
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
d38dab22ff
Meaningless update to project settings file
8 years ago
Robert Fisk
41c0624459
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
42d6030e7b
Refactor and improve HID report item parsing
8 years ago
Robert Fisk
a98af92c23
Correctly parse HID report descriptor items with unusual lengths.
...
Thanks Logitech.
8 years ago
Robert Fisk
00ccd39199
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
12a576b5af
Don't fail if device stalls on SetIdle command (*cough* Logitech mice)
8 years ago
Robert Fisk
c68151698b
Bugfixes for keyboard support: works!!!
8 years ago
Robert Fisk
bc2bf01cbe
Keyboard support implemented, but not tested
8 years ago
Robert Fisk
9b2b8972a4
Incomplete and untested implementation of keyboard support
8 years ago
Robert Fisk
8aec6a6ca3
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
975f2d00af
Fix dynamic crystal frequency detection based on board revision
8 years ago
Robert Fisk
85f965eaa0
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.
8 years ago
Robert Fisk
6b67970f6b
Tweak USB middleware to avoid compiler warning
9 years ago
Robert Fisk
637f67fc14
Implement dynamic crystal frequency selection based on board revision.
...
Also fixed minor issue in hardware revision-detection function.
9 years ago
Robert Fisk
a152cb6037
Ignore Mass Storage subclass, and try to talk with transparent SCSI
...
anyway. This may or may not be helpful!
9 years ago
Robert Fisk
05f71ca098
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 :)
9 years ago
Robert Fisk
f9b7416df0
Sleep instead of busy-wait, approx 50% power reduction!
9 years ago
Robert Fisk
6d52d3b8fc
Merge branch 'HID_parse_error_check' into USG_1.0
9 years ago
Robert Fisk
bca451bf05
Improve HID parser error checking
9 years ago
Robert Fisk
b4326d8ffa
Improve handling of >8bit input values
9 years ago
Robert Fisk
a64b89175e
Improved HID report parser compatibility
9 years ago
Robert Fisk
650d10f22c
Support disconnect/reconnect of attached HID device
9 years ago