標題:
stm32 usb幾行代碼,獲得也不容易。
[打印本頁]
作者:
hushe
時間:
2015-12-22 19:49
標題:
stm32 usb幾行代碼,獲得也不容易。
STM32Cube_FW_F1_V1.2.0\Projects\STM3210E_EVAL\Applications\USB_Device\CDC_Standalone
case CDC_SET_CONTROL_LINE_STATE:
/* Add your code here DTR setup */
if(hpcd.Setup[0] == 0x0012221){
// DTR 為1
__NOP();
__NOP();
__NOP();
} else if(hpcd.Setup[0] == 0x0002221){
// DTR 為0
__NOP();
__NOP();
__NOP();
}
break;
case CDC_SEND_BREAK:
/* Add your code here Break */
if(hpcd.Setup[0] == 0xFFFF2321){
// Break 為1
__NOP();
__NOP();
__NOP();
} else if(hpcd.Setup[0] == 0x00002321){
// Break 為0
__NOP();
__NOP();
__NOP();
}
break;
歡迎光臨 (http://www.torrancerestoration.com/bbs/)
Powered by Discuz! X3.1