git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4585 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
851416ea9c
commit
0ba641f9b4
|
@ -100,15 +100,14 @@ static const USBEndpointConfig ep0config = {
|
||||||
|
|
||||||
static void otg_core_reset(stm32_otg_t *otgp) {
|
static void otg_core_reset(stm32_otg_t *otgp) {
|
||||||
|
|
||||||
/* Wait AHB idle condition.*/
|
|
||||||
while ((otgp->GRSTCTL & GRSTCTL_AHBIDL) == 0)
|
|
||||||
;
|
|
||||||
halPolledDelay(12);
|
|
||||||
/* Core reset and delay of at least 3 PHY cycles.*/
|
/* Core reset and delay of at least 3 PHY cycles.*/
|
||||||
otgp->GRSTCTL = GRSTCTL_CSRST;
|
otgp->GRSTCTL = GRSTCTL_CSRST;
|
||||||
while ((otgp->GRSTCTL & GRSTCTL_CSRST) != 0)
|
while ((otgp->GRSTCTL & GRSTCTL_CSRST) != 0)
|
||||||
;
|
;
|
||||||
halPolledDelay(12);
|
halPolledDelay(12);
|
||||||
|
/* Wait AHB idle condition.*/
|
||||||
|
while ((otgp->GRSTCTL & GRSTCTL_AHBIDL) == 0)
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void otg_disable_ep(stm32_otg_t *otgp) {
|
static void otg_disable_ep(stm32_otg_t *otgp) {
|
||||||
|
|
Loading…
Reference in New Issue