summaryrefslogtreecommitdiff
path: root/components/drivers/usb
diff options
context:
space:
mode:
authorWayne Lin <[email protected]>2020-05-15 09:41:27 +0800
committerWayne Lin <[email protected]>2020-05-15 09:41:27 +0800
commit5d65fe074f0e0ba53673ffef6205aab6baa76d0a (patch)
tree9847ae8364cbd3c7cec8168ba75e2c5cb15a8a41 /components/drivers/usb
parent39431f5a702f3dcec843cb8884064953594243ec (diff)
parentdab737f6375f5cdd86ad3bc6d166657b17364948 (diff)
Merge branch 'master' of https://github.com/rt-thread/rt-thread into rtt_issues
Diffstat (limited to 'components/drivers/usb')
-rw-r--r--components/drivers/usb/usbdevice/class/mstorage.c2
-rw-r--r--components/drivers/usb/usbhost/class/adk.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/components/drivers/usb/usbdevice/class/mstorage.c b/components/drivers/usb/usbdevice/class/mstorage.c
index 43fb25afe4..a681b8212f 100644
--- a/components/drivers/usb/usbdevice/class/mstorage.c
+++ b/components/drivers/usb/usbdevice/class/mstorage.c
@@ -426,7 +426,7 @@ static rt_size_t _read_capacity(ufunction_t func, ustorage_cbw_t cbw)
data = (struct mstorage*)func->user_data;
buf = data->ep_in->buffer;
- sector_count = data->geometry.sector_count;
+ sector_count = data->geometry.sector_count - 1; /* Last Logical Block Address */
sector_size = data->geometry.bytes_per_sector;
buf[0] = sector_count >> 24;
diff --git a/components/drivers/usb/usbhost/class/adk.h b/components/drivers/usb/usbhost/class/adk.h
index 041d47c674..c582ad7f17 100644
--- a/components/drivers/usb/usbhost/class/adk.h
+++ b/components/drivers/usb/usbhost/class/adk.h
@@ -8,8 +8,8 @@
* 2011-12-12 Yi Qiu first version
*/
-#ifndef __HID_H__
-#define __HID_H__
+#ifndef __ADK_H__
+#define __ADK_H__
#include <rtthread.h>