Пример #1
0
/**
  \fn          int32_t USBH_HCI_Uninitialize (void)
  \brief       De-initialize USB Host HCI (OHCI/EHCI) Interface.
  \return      \ref execution_status
*/
static int32_t USBH_HCI_Uninitialize (void) {

  USB1_PinsUnconfigure ();
  USB1_role   =  ARM_USB_ROLE_NONE;
  USB1_state &= ~USBH_DRIVER_INITIALIZED;

  return ARM_DRIVER_OK;
}
Пример #2
0
/**
  \fn          int32_t USBH_HCI_Uninitialize (void)
  \brief       De-initialize USB Host HCI (OHCI/EHCI) Interface.
  \return      \ref execution_status
*/
static int32_t USBH_HCI_Uninitialize (void) {

  if (!(USB1_state & USBH_DRIVER_INITIALIZED)) { return ARM_DRIVER_OK;    }
  if (  USB1_state & USBH_DRIVER_POWERED     ) { return ARM_DRIVER_ERROR; }

  USB1_PinsUnconfigure ();

  USB1_role   =  ARM_USB_ROLE_NONE;
  USB1_state &= ~USBH_DRIVER_INITIALIZED;

  return ARM_DRIVER_OK;
}