mirror of
https://github.com/eddyem/stm32samples.git
synced 2025-12-07 03:05:15 +03:00
fix USB error
This commit is contained in:
parent
20728db47f
commit
9a010dfa13
@ -310,7 +310,7 @@ static uint16_t EP0_Handler(ep_t ep){
|
|||||||
}
|
}
|
||||||
}else if (ep.rx_flag){ // got data over EP0 or host acknowlegement
|
}else if (ep.rx_flag){ // got data over EP0 or host acknowlegement
|
||||||
if(ep.rx_cnt){
|
if(ep.rx_cnt){
|
||||||
EP_WriteIRQ(0, (uint8_t *)0, 0);
|
// EP_WriteIRQ(0, (uint8_t *)0, 0);
|
||||||
if(setup_packet.bRequest == SET_LINE_CODING){
|
if(setup_packet.bRequest == SET_LINE_CODING){
|
||||||
linecoding_handler((usb_LineCoding*)ep0databuf);
|
linecoding_handler((usb_LineCoding*)ep0databuf);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -333,7 +333,7 @@ static uint16_t EP0_Handler(ep_t ep){
|
|||||||
}
|
}
|
||||||
}else if (ep.rx_flag){ // got data over EP0 or host acknowlegement
|
}else if (ep.rx_flag){ // got data over EP0 or host acknowlegement
|
||||||
if(ep.rx_cnt){
|
if(ep.rx_cnt){
|
||||||
EP_WriteIRQ(0, (uint8_t *)0, 0);
|
// EP_WriteIRQ(0, (uint8_t *)0, 0);
|
||||||
if(setup_packet.bRequest == SET_LINE_CODING){
|
if(setup_packet.bRequest == SET_LINE_CODING){
|
||||||
//WRITEDUMP("SET_LINE_CODING");
|
//WRITEDUMP("SET_LINE_CODING");
|
||||||
linecoding_handler((usb_LineCoding*)ep0databuf);
|
linecoding_handler((usb_LineCoding*)ep0databuf);
|
||||||
|
|||||||
@ -334,7 +334,7 @@ uint16_t EP0_Handler(ep_t ep){
|
|||||||
WRITEDUMP("SET_LINE_CODING");
|
WRITEDUMP("SET_LINE_CODING");
|
||||||
linecoding_handler((usb_LineCoding*)ep0databuf);
|
linecoding_handler((usb_LineCoding*)ep0databuf);
|
||||||
}
|
}
|
||||||
EP_WriteIRQ(0, (uint8_t *)0, 0);
|
//EP_WriteIRQ(0, (uint8_t *)0, 0);
|
||||||
}
|
}
|
||||||
// Close transaction
|
// Close transaction
|
||||||
epstatus = CLEAR_DTOG_RX(epstatus);
|
epstatus = CLEAR_DTOG_RX(epstatus);
|
||||||
|
|||||||
@ -307,7 +307,7 @@ static uint16_t EP0_Handler(ep_t ep){
|
|||||||
}
|
}
|
||||||
}else if (ep.rx_flag){ // got data over EP0 or host acknowlegement
|
}else if (ep.rx_flag){ // got data over EP0 or host acknowlegement
|
||||||
if(ep.rx_cnt){
|
if(ep.rx_cnt){
|
||||||
EP_WriteIRQ(0, (uint8_t *)0, 0);
|
// EP_WriteIRQ(0, (uint8_t *)0, 0);
|
||||||
if(setup_packet.bRequest == SET_LINE_CODING){
|
if(setup_packet.bRequest == SET_LINE_CODING){
|
||||||
linecoding_handler((usb_LineCoding*)ep0databuf);
|
linecoding_handler((usb_LineCoding*)ep0databuf);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -307,7 +307,7 @@ static uint16_t EP0_Handler(ep_t ep){
|
|||||||
}
|
}
|
||||||
}else if (ep.rx_flag){ // got data over EP0 or host acknowlegement
|
}else if (ep.rx_flag){ // got data over EP0 or host acknowlegement
|
||||||
if(ep.rx_cnt){
|
if(ep.rx_cnt){
|
||||||
EP_WriteIRQ(0, (uint8_t *)0, 0);
|
// EP_WriteIRQ(0, (uint8_t *)0, 0);
|
||||||
if(setup_packet.bRequest == SET_LINE_CODING){
|
if(setup_packet.bRequest == SET_LINE_CODING){
|
||||||
linecoding_handler((usb_LineCoding*)ep0databuf);
|
linecoding_handler((usb_LineCoding*)ep0databuf);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user