mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2025-04-21 12:27:27 +03:00
cleanup head files
remove: archdefs.h mips.h mipsregs.h sysdefs.h Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
This commit is contained in:
64
usbboot/xburst_include/usb/udc.h
Normal file
64
usbboot/xburst_include/usb/udc.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Qi Hardware Inc.,
|
||||
* Author: Xiangfu Liu <xiangfu@qi-hardware.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 3 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA
|
||||
*/
|
||||
#ifndef __UDC_H__
|
||||
#define __UDC_H__
|
||||
|
||||
#include "usb.h"
|
||||
#define MAX_EP0_SIZE 64
|
||||
#define MAX_EP1_SIZE 512
|
||||
|
||||
#define USB_HS 0
|
||||
#define USB_FS 1
|
||||
#define USB_LS 2
|
||||
|
||||
//definitions of EP0
|
||||
#define USB_EP0_IDLE 0
|
||||
#define USB_EP0_RX 1
|
||||
#define USB_EP0_TX 2
|
||||
/* Define maximum packet size for endpoint 0 */
|
||||
#define M_EP0_MAXP 64
|
||||
/* Endpoint 0 status structure */
|
||||
|
||||
|
||||
|
||||
static __inline__ void usb_setb(u32 port, u8 val)
|
||||
{
|
||||
volatile u8 *ioport = (volatile u8 *)(port);
|
||||
*ioport = (*ioport) | val;
|
||||
}
|
||||
|
||||
static __inline__ void usb_clearb(u32 port, u8 val)
|
||||
{
|
||||
volatile u8 *ioport = (volatile u8 *)(port);
|
||||
*ioport = (*ioport) & ~val;
|
||||
}
|
||||
|
||||
static __inline__ void usb_setw(u32 port, u16 val)
|
||||
{
|
||||
volatile u16 *ioport = (volatile u16 *)(port);
|
||||
*ioport = (*ioport) | val;
|
||||
}
|
||||
|
||||
static __inline__ void usb_clearw(u32 port, u16 val)
|
||||
{
|
||||
volatile u16 *ioport = (volatile u16 *)(port);
|
||||
*ioport = (*ioport) & ~val;
|
||||
}
|
||||
|
||||
#endif //__UDC_H__
|
||||
Reference in New Issue
Block a user