aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F7xx
diff options
context:
space:
mode:
authorbarthess <barthess@yandex.ru>2016-10-28 14:25:08 +0300
committerbarthess <barthess@yandex.ru>2016-10-28 14:25:08 +0300
commit92c371470649d58e1e76e6c255fe3c010fc8ef54 (patch)
tree3c4181aebf78313e43e5dbb8c2c5a8eacad0cbaa /testhal/STM32/STM32F7xx
parentb7cefd6fac81a164017c4f81b8b53584e104db0b (diff)
downloadChibiOS-Contrib-92c371470649d58e1e76e6c255fe3c010fc8ef54.tar.gz
ChibiOS-Contrib-92c371470649d58e1e76e6c255fe3c010fc8ef54.tar.bz2
ChibiOS-Contrib-92c371470649d58e1e76e6c255fe3c010fc8ef54.zip
USB_MSD. Added READ_FORMAT_CAPACITIES handler
Diffstat (limited to 'testhal/STM32/STM32F7xx')
-rw-r--r--testhal/STM32/STM32F7xx/USB_MSD/main.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/testhal/STM32/STM32F7xx/USB_MSD/main.c b/testhal/STM32/STM32F7xx/USB_MSD/main.c
index 2d17088..cae2b74 100644
--- a/testhal/STM32/STM32F7xx/USB_MSD/main.c
+++ b/testhal/STM32/STM32F7xx/USB_MSD/main.c
@@ -52,6 +52,15 @@ RamDisk ramdisk;
__attribute__((section("DATA_RAM"))) static uint8_t ramdisk_storage[RAMDISK_BLOCK_SIZE * RAMDISK_BLOCK_CNT];
static uint8_t blkbuf[RAMDISK_BLOCK_SIZE];
+BaseSequentialStream *GlobalDebugChannel;
+
+static const SerialConfig sercfg = {
+ 115200,
+ 0,
+ 0,
+ 0
+};
+
/*
* Application entry point.
*/
@@ -67,6 +76,9 @@ int main(void) {
halInit();
chSysInit();
+ sdStart(&SD3, &sercfg);
+ GlobalDebugChannel = (BaseSequentialStream *)&SD3;
+
/*
* Activates the USB driver and then the USB bus pull-up on D+.
* Note, a delay is inserted in order to not have to disconnect the cable
@@ -75,7 +87,6 @@ int main(void) {
usbDisconnectBus(&USBD1);
chThdSleepMilliseconds(1500);
usbStart(&USBD1, &usbcfg);
- usbConnectBus(&USBD1);
/*
* start RAM disk
@@ -94,6 +105,11 @@ int main(void) {
msdStart(&USBMSD1, &USBD1, (BaseBlockDevice *)&ramdisk, blkbuf, NULL);
/*
+ *
+ */
+ usbConnectBus(&USBD1);
+
+ /*
* Starting threads.
*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);