Ejemplo n.º 1
0
/*FUNCTION*-------------------------------------------------------------------
*
* Function Name    : _bsp_usb_dev_init
* Returned Value   : 0 for success, -1 for failure
* Comments         :
*    This function performs BSP-specific initialization related to USB
*
*END*----------------------------------------------------------------------*/
_mqx_int _bsp_usb_dev_init(struct usb_dev_if_struct *usb_if)
{
    VMCF5329_STRUCT_PTR reg_ptr = _PSP_GET_IPSBAR();
    uint_32 status;
    _bsp_usb_io_init(USB_CONNECTOR_OTG);
    
    /* setup interrupt */
    status = _mcf5329_int_init(MCF5329_INT_USB_OTG, 2, TRUE);
    
    if (status != MQX_OK) {
        return -1;
    }

    return MQX_OK;
}
Ejemplo n.º 2
0
/*FUNCTION*-------------------------------------------------------------------
*
* Function Name    : _bsp_usb_init
* Returned Value   : 0 for success, -1 for failure
* Comments         :
*    This function performs BSP-specific initialization related to USB
*
*END*----------------------------------------------------------------------*/
_mqx_int _bsp_usb_host_init(pointer param)
{
    VMCF5329_STRUCT_PTR reg_ptr = _PSP_GET_IPSBAR();
    uint_32 status;
    host_device=1;

    _bsp_usb_io_init(USB_CONNECTOR_HOST);
    
    /* setup interrupt */
    status = _mcf5329_int_init(MCF5329_INT_USB_HOST, 2, TRUE);
    
    if (status != MQX_OK) {
        return -1;
    }

    return MQX_OK;
}