Commit Graph

5 Commits (2f56029f55123ce163d76ca365d65421fa35bf8f)

Author SHA1 Message Date
Masao Hamanaka 63cfe8da23 Fix some bugs about USBHost common codes.
Find some bugs in USBHost common codes. Bugs as below.
- USBHostMouse.cpp
 - Memory destroy will occur when the size of interrupt transfer is larger than 4 bytes.

- USBHostMSD.cpp
 - Type declaration of vender dependent.
     U16 -> uint16_t

- USBHostSerial.cpp
  - connected() will not be "true".
  - Communication with USBSerial will not start.
2015-01-15 14:01:48 +09:00
neilt6 083ac31ad5 Added count argument to disk read/write
The count argument in disk_read() and disk_write() is now passed to the
FATFileSystem instance. This allows more efficient disk drivers to be
written that can read and write multiple sectors at a time.
2014-08-13 09:12:12 -06:00
0xc0170 081230ee9c spaces removal - USBHost 2014-05-29 15:16:53 +02:00
Adam Green c0d7c3fb39 USBHost: Silence narrowing warning in USBHostMSD::inquiry
I changed the following initialization from:
    uint8_t cmd[6] = {0x12, (lun << 5) | evpd, page_code, 0, 36, 0};
to:
    uint8_t cmd[6] = {0x12, uint8_t((lun << 5) | evpd), page_code, 0, 36, 0};
This makes it clear to the compiler that we are Ok with the 32-bit
integer result from the shift and logical OR operation (after integral
promotions) being truncated down to a 8-bit unsigned value.  This is
safe as long as lun only has a value of 7 or lower.
2013-08-29 21:16:45 -07:00
unknown 1c981f929a add USBHost library 2013-03-14 16:36:35 +00:00