标题:
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.51hei.com/bbs/)
Powered by Discuz! X3.1