stm32F103做的U盘 mass storage 如何检测电脑弹出了?
各位好,请问大家有没做个U盘 电脑上已经弹出检测?感谢!
103不清楚,好久没用F1的USB功能了,F4的比较简单,在这几个消息里面做标志即可。另外跟你电脑自带的USB驱动识别速度也有关系,有时候电脑反应迟钝,得等会才能出来。
/**
* @briefDisplays the message on LCD on device config event
* @paramNone
* @retval Status
*/
void USBD_USR_DeviceConfigured (void)
{
usb_printf("> MSC Interface started.\n");
}
/**
* @briefDisplays the message on LCD on device suspend event
* @paramNone
* @retval None
*/
void USBD_USR_DeviceSuspended(void)
{
usb_printf("> Device In suspend mode.\n");
}
/**
* @briefDisplays the message on LCD on device resume event
* @paramNone
* @retval None
*/
void USBD_USR_DeviceResumed(void)
{
}
/**
* @briefUSBD_USR_DeviceConnected
* Displays the message on LCD on device connection Event
* @paramNone
* @retval Status
*/
void USBD_USR_DeviceConnected (void)
{
usb_printf("> USB Device Connected.\n");
}
/**
* @briefUSBD_USR_DeviceDisonnected
* Displays the message on LCD on device disconnection Event
* @paramNone
* @retval Status
*/
void USBD_USR_DeviceDisconnected (void)
{
usb_printf("> USB Device Disconnected.\n");
}
感谢老大, 我测试一下.
页:
[1]