stmhal: Fix USB CDC buffer overrun error.
stmhal: Fix USB CDC buffer overrun error.

Need to wait for the low-level USB driver to send the data over the USB
in-endpoint before the buffer can be used again.  This patch adds a
check for this.

deshipu/micropython,skybird6672/micropython,rubencabrera/micropython,tralamazza/micropython,Peetz0r/micropython-esp32,redbear/micropython,pramasoul/micropython,adamkh/micropython,praemdonck/micropython,Vogtinator/micropython,EcmaXp/micropython,TDAbboud/micropython,matthewelse/micropython,vriera/micropython,heisewangluo/micropython,vriera/micropython,EcmaXp/micropython,lbattraw/micropython,heisewangluo/micropython,cloudformdesign/micropython,suda/micropython,adamkh/micropython,ernesto-g/micropython,pozetroninc/micropython,danicampora/micropython,turbinenreiter/micropython,ChuckM/micropython,MrSurly/micropython-esp32,tdautc19841202/micropython,paul-xxx/micropython,xuxiaoxin/micropython,stonegithubs/micropython,ahotam/micropython,ernesto-g/micropython,tralamazza/micropython,mhoffma/micropython,matthewelse/micropython,trezor/micropython,jimkmc/micropython,TDAbboud/micropython,methoxid/micropystat,Vogtinator/micropython,paul-xxx/micropython,ahotam/micropython,jlillest/micropython,TDAbboud/micropython,vitiral/micropython,ernesto-g/micropython,tralamazza/micropython,noahwilliamsson/micropython,xyb/micropython,drrk/micropython,MrSurly/micropython,xhat/micropython,lbattraw/micropython,vitiral/micropython,feilongfl/micropython,alex-robbins/micropython,neilh10/micropython,kostyll/micropython,vriera/micropython,supergis/micropython,kerneltask/micropython,cwyark/micropython,cloudformdesign/micropython,swegener/micropython,orionrobots/micropython,adafruit/micropython,deshipu/micropython,SungEun-Steve-Kim/test-mp,dhylands/micropython,AriZuu/micropython,ganshun666/micropython,Peetz0r/micropython-esp32,swegener/micropython,dhylands/micropython,micropython/micropython-esp32,feilongfl/micropython,KISSMonX/micropython,hosaka/micropython,xyb/micropython,Peetz0r/micropython-esp32,hosaka/micropython,henriknelson/micropython,firstval/micropython,orionrobots/micropython,trezor/micropython,slzatz/micropython,HenrikSolver/micropython,henriknelson/micropython,dinau/micropython,pramasoul/micropython,henriknelson/micropython,mpalomer/micropython,heisewangluo/micropython,SHA2017-badge/micropython-esp32,cnoviello/micropython,toolmacher/micropython,warner83/micropython,paul-xxx/micropython,slzatz/micropython,Vogtinator/micropython,praemdonck/micropython,infinnovation/micropython,heisewangluo/micropython,feilongfl/micropython,infinnovation/micropython,utopiaprince/micropython,mianos/micropython,lowRISC/micropython,aethaniel/micropython,ceramos/micropython,alex-robbins/micropython,firstval/micropython,AriZuu/micropython,henriknelson/micropython,bvernoux/micropython,jlillest/micropython,dxxb/micropython,jmarcelino/pycom-micropython,Peetz0r/micropython-esp32,jmarcelino/pycom-micropython,blazewicz/micropython,MrSurly/micropython-esp32,tobbad/micropython,hosaka/micropython,infinnovation/micropython,MrSurly/micropython-esp32,SHA2017-badge/micropython-esp32,MrSurly/micropython,trezor/micropython,hiway/micropython,galenhz/micropython,tdautc19841202/micropython,adamkh/micropython,drrk/micropython,ganshun666/micropython,aethaniel/micropython,martinribelotta/micropython,lowRISC/micropython,dxxb/micropython,SHA2017-badge/micropython-esp32,Vogtinator/micropython,lbattraw/micropython,AriZuu/micropython,pramasoul/micropython,EcmaXp/micropython,mianos/micropython,adafruit/micropython,noahchense/micropython,feilongfl/micropython,dmazzella/micropython,orionrobots/micropython,xhat/micropython,hiway/micropython,vitiral/micropython,cnoviello/micropython,ernesto-g/micropython,xuxiaoxin/micropython,matthewelse/micropython,pramasoul/micropython,PappaPeppar/micropython,KISSMonX/micropython,skybird6672/micropython,torwag/micropython,MrSurly/micropython,utopiaprince/micropython,pfalcon/micropython,aethaniel/micropython,PappaPeppar/micropython,dxxb/micropython,bvernoux/micropython,deshipu/micropython,neilh10/micropython,supergis/micropython,rubencabrera/micropython,oopy/micropython,toolmacher/micropython,Vogtinator/micropython,puuu/micropython,alex-robbins/micropython,jimkmc/micropython,henriknelson/micropython,stonegithubs/micropython,orionrobots/micropython,deshipu/micropython,dhylands/micropython,mianos/micropython,jimkmc/micropython,emfcamp/micropython,puuu/micropython,dxxb/micropython,noahchense/micropython,ganshun666/micropython,kerneltask/micropython,utopiaprince/micropython,mhoffma/micropython,trezor/micropython,ceramos/micropython,mianos/micropython,ryannathans/micropython,kostyll/micropython,EcmaXp/micropython,noahwilliamsson/micropython,tuc-osg/micropython,stonegithubs/micropython,swegener/micropython,cwyark/micropython,hiway/micropython,dinau/micropython,ruffy91/micropython,jlillest/micropython,drrk/micropython,AriZuu/micropython,torwag/micropython,matthewelse/micropython,ChuckM/micropython,ahotam/micropython,misterdanb/micropython,aethaniel/micropython,adamkh/micropython,ChuckM/micropython,firstval/micropython,stonegithubs/micropython,alex-march/micropython,SungEun-Steve-Kim/test-mp,emfcamp/micropython,misterdanb/micropython,alex-march/micropython,xyb/micropython,ahotam/micropython,blazewicz/micropython,MrSurly/micropython,blmorris/micropython,infinnovation/micropython,mpalomer/micropython,xyb/micropython,MrSurly/micropython-esp32,kostyll/micropython,danicampora/micropython,mgyenik/micropython,ruffy91/micropython,adafruit/micropython,alex-robbins/micropython,suda/micropython,turbinenreiter/micropython,drrk/micropython,vitiral/micropython,galenhz/micropython,warner83/micropython,chrisdearman/micropython,dmazzella/micropython,KISSMonX/micropython,Timmenem/micropython,skybird6672/micropython,ganshun666/micropython,ganshun666/micropython,omtinez/micropython,paul-xxx/micropython,jlillest/micropython,Timmenem/micropython,ceramos/micropython,bvernoux/micropython,TDAbboud/micropython,pramasoul/micropython,chrisdearman/micropython,bvernoux/micropython,galenhz/micropython,dmazzella/micropython,ceramos/micropython,dxxb/micropython,deshipu/micropython,toolmacher/micropython,mpalomer/micropython,mgyenik/micropython,orionrobots/micropython,torwag/micropython,methoxid/micropystat,dinau/micropython,emfcamp/micropython,ericsnowcurrently/micropython,adafruit/circuitpython,methoxid/micropystat,tobbad/micropython,redbear/micropython,jmarcelino/pycom-micropython,SHA2017-badge/micropython-esp32,neilh10/micropython,HenrikSolver/micropython,lbattraw/micropython,pfalcon/micropython,puuu/micropython,kerneltask/micropython,suda/micropython,lbattraw/micropython,xyb/micropython,alex-march/micropython,heisewangluo/micropython,alex-robbins/micropython,adafruit/micropython,trezor/micropython,noahwilliamsson/micropython,chrisdearman/micropython,toolmacher/micropython,KISSMonX/micropython,martinribelotta/micropython,mhoffma/micropython,cloudformdesign/micropython,TDAbboud/micropython,ceramos/micropython,micropython/micropython-esp32,cwyark/micropython,KISSMonX/micropython,kerneltask/micropython,xuxiaoxin/micropython,HenrikSolver/micropython,cnoviello/micropython,blmorris/micropython,ChuckM/micropython,ericsnowcurrently/micropython,noahchense/micropython,oopy/micropython,HenrikSolver/micropython,ericsnowcurrently/micropython,ericsnowcurrently/micropython,supergis/micropython,redbear/micropython,tuc-osg/micropython,omtinez/micropython,rubencabrera/micropython,omtinez/micropython,xhat/micropython,kerneltask/micropython,SHA2017-badge/micropython-esp32,lowRISC/micropython,turbinenreiter/micropython,noahwilliamsson/micropython,oopy/micropython,jmarcelino/pycom-micropython,kostyll/micropython,lowRISC/micropython,slzatz/micropython,adafruit/circuitpython,mgyenik/micropython,pfalcon/micropython,ryannathans/micropython,chrisdearman/micropython,tralamazza/micropython,slzatz/micropython,methoxid/micropystat,drrk/micropython,SungEun-Steve-Kim/test-mp,swegener/micropython,vriera/micropython,selste/micropython,tuc-osg/micropython,ChuckM/micropython,AriZuu/micropython,tdautc19841202/micropython,matthewelse/micropython,turbinenreiter/micropython,dhylands/micropython,PappaPeppar/micropython,omtinez/micropython,omtinez/micropython,utopiaprince/micropython,redbear/micropython,mhoffma/micropython,mgyenik/micropython,jmarcelino/pycom-micropython,rubencabrera/micropython,martinribelotta/micropython,neilh10/micropython,mgyenik/micropython,slzatz/micropython,paul-xxx/micropython,Timmenem/micropython,selste/micropython,pfalcon/micropython,torwag/micropython,stonegithubs/micropython,oopy/micropython,swegener/micropython,firstval/micropython,jimkmc/micropython,mhoffma/micropython,pozetroninc/micropython,hosaka/micropython,tuc-osg/micropython,danicampora/micropython,lowRISC/micropython,skybird6672/micropython,methoxid/micropystat,torwag/micropython,adafruit/micropython,ryannathans/micropython,cwyark/micropython,supergis/micropython,blazewicz/micropython,pfalcon/micropython,supergis/micropython,ruffy91/micropython,aethaniel/micropython,misterdanb/micropython,praemdonck/micropython,adafruit/circuitpython,oopy/micropython,alex-march/micropython,tobbad/micropython,tdautc19841202/micropython,warner83/micropython,Timmenem/micropython,tobbad/micropython,dmazzella/micropython,toolmacher/micropython,PappaPeppar/micropython,ahotam/micropython,danicampora/micropython,rubencabrera/micropython,mpalomer/micropython,praemdonck/micropython,EcmaXp/micropython,noahchense/micropython,cloudformdesign/micropython,blazewicz/micropython,noahwilliamsson/micropython,danicampora/micropython,blazewicz/micropython,Timmenem/micropython,tuc-osg/micropython,feilongfl/micropython,warner83/micropython,MrSurly/micropython-esp32,chrisdearman/micropython,vitiral/micropython,infinnovation/micropython,emfcamp/micropython,xuxiaoxin/micropython,vriera/micropython,blmorris/micropython,adafruit/circuitpython,tobbad/micropython,galenhz/micropython,galenhz/micropython,hiway/micropython,noahchense/micropython,jlillest/micropython,dinau/micropython,xhat/micropython,bvernoux/micropython,misterdanb/micropython,kostyll/micropython,micropython/micropython-esp32,suda/micropython,emfcamp/micropython,warner83/micropython,micropython/micropython-esp32,xhat/micropython,MrSurly/micropython,mianos/micropython,skybird6672/micropython,xuxiaoxin/micropython,dinau/micropython,Peetz0r/micropython-esp32,blmorris/micropython,selste/micropython,adafruit/circuitpython,ruffy91/micropython,hiway/micropython,ruffy91/micropython,martinribelotta/micropython,blmorris/micropython,tdautc19841202/micropython,redbear/micropython,cnoviello/micropython,PappaPeppar/micropython,HenrikSolver/micropython,misterdanb/micropython,martinribelotta/micropython,cwyark/micropython,jimkmc/micropython,suda/micropython,selste/micropython,selste/micropython,firstval/micropython,neilh10/micropython,adamkh/micropython,SungEun-Steve-Kim/test-mp,micropython/micropython-esp32,cnoviello/micropython,ernesto-g/micropython,mpalomer/micropython,praemdonck/micropython,hosaka/micropython,utopiaprince/micropython,SungEun-Steve-Kim/test-mp,ryannathans/micropython,alex-march/micropython,puuu/micropython,cloudformdesign/micropython,ryannathans/micropython,ericsnowcurrently/micropython,turbinenreiter/micropython,adafruit/circuitpython,pozetroninc/micropython,pozetroninc/micropython,puuu/micropython,pozetroninc/micropython,dhylands/micropython,matthewelse/micropython