aboutsummaryrefslogtreecommitdiff
path: root/stmhal/usbdev
AgeCommit message (Collapse)Author
2014-09-15stmhal: Change 64-bit arithmetic to 32-bit for SD card block addressing.Damien George
By measuring SD card addresses in blocks and not bytes, one can get away with using 32-bit numbers. This patch also uses proper atomic lock/unlock around SD card read/write, adds SD.info() function, and gives error code for failed read/writes.
2014-04-16stmhal: Replace magic number 3 with CDC_IN_EP define.Damien George
2014-04-16stmhal: Improve flash storage cache management.Damien George
Internal flash used for the filesystem is now written (from the cache) only after a 5s delay, or when a file is closed, or when the drive is unmounted from the host. This delay means that multiple writes can accumulate in the cache, and leads to less writes to the flash, making it last longer. It's implemented by a high-priority interrupt that takes care of flash erase and write, and flushing the cache. This is still only an interim solution for the flash filesystem. It eventually needs to be replaced with something that uses less RAM for the cache, something that can use more of the flash, and something that does proper wear levelling.
2014-04-15stmhal: Fix USB MSC so that it unmounts correctly on Mac OS X.Damien George
Mac OS X sends a SCSI command to remove the medium when it unmounts a drive. If this command is not honoured, then OS X will automatically remount the drive, making it impossible to eject. This patch disables the USB MSC when the right SCSI command is sent.
2014-03-30stmhal: Implement selector for USB device mode; improve boot up.Damien George
Can now choose at boot up whether the USB device is CDC+MSC or CDC+HID. Choice is made by an option in boot.py, with default being CDC+MSC. HID+MSC is not currently supported, but should be easy to implement. Boot up now has ability to change the reset mode: hold down USR switch while booting and LEDs will count from 1 to 7 to indicate the boot mode. Release USR when correct mode is selected. Current modes are 1 (normal boot), 2 (safe mode), 3 (reset FS mode).
2014-03-29stmhal: Add CDC+HID USB device.Damien George
The HID device must appear before the CDC in order for both to work at the same time. Whilst the code is working, it's not currently used.
2014-03-22stmhal: Tidy up USB CDC+MSC device some more.Damien George
2014-03-22stmhal: Tidy up USB device configuration. Make it use less RAM.Damien George
2014-03-22stmhal: USB CDC and MSC device work together.Damien George
2014-03-21stmhal: Add support for USB MSC device.Damien George
This gives a functioning, independent MSC device.
2014-03-14stmhal: Get USB enumerating a CDC device.Damien George
Enumerates CDC device over USB, but doesn't transmit/receive yet.
2014-03-11Initial checkin with STM HALDave Hylands
This compiles and links, but hasn't been tested on a board yet and even if it was run, it doesn't currently do anything.