aboutsummaryrefslogtreecommitdiff
path: root/stm/lib/usbd_storage_msd.c
diff options
context:
space:
mode:
authorDamien2013-10-19 18:13:48 +0100
committerDamien2013-10-19 18:13:48 +0100
commitafe12bca23b106a18796bf6ed793ff1389bdddb2 (patch)
treec34020314b3b1ed7a6106a3582882460471ef1dc /stm/lib/usbd_storage_msd.c
parentfb42ec17bcf7508f66b8d8d0770b60c33be0d6ab (diff)
Fix IRQ priority issue to give working USB; and some cleanup.
Diffstat (limited to 'stm/lib/usbd_storage_msd.c')
-rw-r--r--stm/lib/usbd_storage_msd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/stm/lib/usbd_storage_msd.c b/stm/lib/usbd_storage_msd.c
index 47790bb11..afdd47865 100644
--- a/stm/lib/usbd_storage_msd.c
+++ b/stm/lib/usbd_storage_msd.c
@@ -28,6 +28,9 @@
/* Includes ------------------------------------------------------------------*/
#include "usbd_msc_mem.h"
#include "usb_conf.h"
+
+#include "misc.h"
+#include "storage.h"
#include "diskio.h"
/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
@@ -198,9 +201,9 @@ int8_t STORAGE_GetCapacity (uint8_t lun, uint32_t *block_num, uint32_t *block_si
*/
- *block_size = 512;
+ *block_size = storage_get_block_size();
//*block_num = SDCardInfo.CardCapacity / 512;
- *block_num = 256 + 128;
+ *block_num = storage_get_block_count();
return (0);
@@ -305,7 +308,7 @@ int8_t STORAGE_Write (uint8_t lun,
while (SD_GetStatus() != SD_TRANSFER_OK);
#endif
*/
- disk_write(0, buf, blk_addr, blk_len);
+ //disk_write(0, buf, blk_addr, blk_len);
return (0);
}