⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uh1.h

📁 TDI的USB HOST芯片UHC124的编程手册和固件驱动源代码
💻 H
字号:
/*
	UH1.H: symbolic definitions and function prototypes for
	UH124 user interface library Level 1.

(C) Copyright TransDimension, Inc.  All rights reserved.             
                                                                   
Modification history
====================
22Nov1999 Original Release
31Jan2001 Modified, JW
20Mar2001 Modified, JW

*/

#include "types.h"

/*	some symbolic definitions */

#define SP_SIZE		8

/*	data xact control word, compatible with uhcc11 */

#define CTL_DIR		0x80
#define CTL_OUT		0x0
#define CTL_IN		0x80

#define CTL_SEQ		0x8
#define CTL_DATA0	0x0
#define CTL_DATA1	0x8

#define CTL_ISO		0x1

#define DEV_LSP		0x1
#define DEV_FSP		0x0

/*	UhcControl related functions */

void UH_PwrSav(void);
void UH_SoftReset(void);

U8 UH_USBSysState(void);
void UH_USBReset(void);
I16 UH_USBResume(void);
I16 UH_USBSuspend(void);
I16 UH_USBOperational(void);

I16 UH_DispBatch(void);
U16 UH_EndBatch(void);

/*	frame management functions */

U8 UH_MaxOverhead(void);
void UH_SetMaxOverhead(U8 mo);
U16 UH_FmNumber(void);
U16 UH_FmRemaining(void);
U16 UH_FmInterval(void);
void UH_SetFmInterval(U16 intv);

/*	batch transaction functions */

U16 UH_TransDone(void);
U16 UH_TransSel(void);
I16 UH_SetTransSel(U16 sel);

/*	interrupt related functions */

U8 UH_IntpEnb(void);
void UH_SetIntpEnb(U8 mask);
void UH_ClrIntpStatus(U8 mask);
U8 UH_IntpStatus(void);

/*	magic number related functions */

U8 UH_MagicNumber(void);
void UH_SetMagicNumber(U8 mo);
U8 UH_PortChange(void);
void UH_MagicReset(void);

/*	transaction related functions */

void UH_DispSetup(U8 xd, U8 dev, U8 ep, 
		U16 setup, U8 stop, U8 spd);
void UH_DispData(U8 xd, U8 dev, U8 ep, 
		U16 data, U16 len, U8 ctl, U8 stop, U8 spd);

/*	transaction setup and status */

U8 UH_XDType(U8 xd);
U8 UH_XDStop(U8 xd);
U8 UH_XDStatus(U8 xd);
U16 UH_XDXferCnt(U8 xd);
U16 UH_XDBufLength(U8 xd);
U16 UH_XDBufAddr(U8 xd);

⌨️ 快捷键说明

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