Skip to content

Commit

Permalink
fix OTG lib int disable
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Reinecke committed Jan 24, 2016
1 parent 80462e3 commit 10f63f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/STM32_USB_OTG_Driver-2.2.0/src/usb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ USB_OTG_STS USB_OTG_EnableGlobalInt(USB_OTG_CORE_HANDLE *pdev)

/**
* @brief USB_OTG_DisableGlobalInt
* Enables the controller's Global Int in the AHB Config reg
* Disables the controller's Global Int in the AHB Config reg
* @param pdev : Selected device
* @retval USB_OTG_STS : status
*/
Expand All @@ -469,7 +469,7 @@ USB_OTG_STS USB_OTG_DisableGlobalInt(USB_OTG_CORE_HANDLE *pdev)
USB_OTG_STS status = USB_OTG_OK;
USB_OTG_GAHBCFG_TypeDef ahbcfg;
ahbcfg.d32 = 0;
ahbcfg.b.glblintrmsk = 1; /* Enable interrupts */
ahbcfg.b.glblintrmsk = 0; /* Disable interrupts */
USB_OTG_MODIFY_REG32(&pdev->regs.GREGS->GAHBCFG, ahbcfg.d32, 0);
return status;
}
Expand Down

0 comments on commit 10f63f3

Please sign in to comment.