udc.h

来自「君正早期ucos系统(只有早期的才不没有打包成库),MPLAYER,文件系统,图」· C头文件 代码 · 共 74 行

H
74
字号
/********************** BEGIN LICENSE BLOCK ************************************ * * JZ4740  mobile_tv  Project  V1.0.0 * INGENIC CONFIDENTIAL--NOT FOR DISTRIBUTION IN SOURCE CODE FORM * Copyright (c) Ingenic Semiconductor Co. Ltd 2005. All rights reserved. *  * This file, and the files included with this file, is distributed and made  * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER  * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES,  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS  * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.  *  * http://www.ingenic.cn  * ********************** END LICENSE BLOCK ************************************** * *  Author:  <dsqiu@ingenic.cn>  <jgao@ingenic.cn>  * *  Create:   2008-06-26, by dsqiu *             *  Maintain: 2008-06-26, by jgao *             * ******************************************************************************* */ #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__

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?