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

📄 usbhalos.h

📁 一个Linux下的软猫驱动
💻 H
📖 第 1 页 / 共 2 页
字号:
********************************************************************************/__shimcall__HANDLE OsUsbGetTxRequest				(HANDLE hUsbOsHal);__shimcall__VOID OsUsbReturnUnusedRequest (HANDLE hRequest);/********************************************************************************Name:           OsUsbMakeNotifyRequestDescription:    Schedules device-to-host interrupt request on pipe 2 (notification).				Arguments:      hUsbOsHal	- bottom HAL handleReturn Value:   result of the callNotes:			This function can be called on high CPU priority level and must return				immediately and must not wait on any synchronization object.********************************************************************************/__shimcall__BOOL OsUsbMakeNotifyRequest				(HANDLE hUsbOsHal);/********************************************************************************Name:           OsUsbMakeDataTransmitRequestDescription:    Schedules host-to-device bulk request on pipe 1 (data).				Arguments:      hUsbOsHal	- bottom HAL handle				hRequest	- handle to an OS specific data structure needed to 							  initiate a bulk request. This handle is returned by							  OsUsbGetTxRequest() call				pBuf		- points to data to be transmitted				nBytes		- size of data to be transmittedReturn Value:   result of the callNotes:			This function can be called on high CPU priority level and must return				immediately and must not wait on any synchronization object.********************************************************************************/__shimcall__BOOL OsUsbMakeDataTransmitRequest		(HANDLE hUsbOsHal, HANDLE hRequest, PVOID pBuf, UINT32 nBytes);/********************************************************************************Name:           OsUsbMakeDataReceiveRequestDescription:    Schedules device-to-host bulk request on pipe 1 (data).				Arguments:      hUsbOsHal	- bottom HAL handle				pBuf		- points to a buffer to store received data				nBytes		- size of data to receiveReturn Value:   result of the callNotes:			This function can be called on high CPU priority level and must return				immediately and must not wait on any synchronization object.********************************************************************************/__shimcall__BOOL OsUsbMakeDataReceiveRequest		(HANDLE hUsbOsHal, PVOID pBuf, UINT32 nBytes);#if TARGET_HCF_FAMILY/********************************************************************************Name:           OsUsbMakeDownloadTransmitRequestDescription:    Schedules host-to-device bulk request on pipe 3 (DSP download).				Arguments:      hUsbOsHal	- bottom HAL handle				pBuf		- points to data to be transmitted				nBytes		- size of data to be transmittedReturn Value:   result of the callNotes:			This function can be called on high CPU priority level and must return				immediately and must not wait on any synchronization object.********************************************************************************/__shimcall__BOOL OsUsbMakeDownloadTransmitRequest	(HANDLE pUsbOsHal, PVOID pBuf, UINT32 nBytes);#endif//#$YS$/********************************************************************************Name:           OsUsbResetPortDescription:    Reset USB port.				Arguments:      hUsbOsHal	- bottom HAL handle.Return Value:   None********************************************************************************/__shimcall__void OsUsbResetPort(HANDLE hUsbOsHal);#ifdef USE_DCP/********************************************************************************Name:           OsUsbMakeDcpRequestDescription:    Schedules device-to-host bulk request on pipe 3 (DCP).				Arguments:      hUsbOsHal	- bottom HAL handle				pBuf		- buffer to read samples to				nBytes		- size of such bufferReturn Value:   noneNotes:			After USB completion routine is called, bottom HAL reschedules USB				bulk request on pipe 3 without top HAL intervention until 				OsUsbCancelDcpRequests() is called.********************************************************************************/__shimcall__BOOL OsUsbMakeDcpRequest				(HANDLE hUsbOsHal, PVOID pBuf, UINT32 nBytes);__shimcall__void OsUsbStartDcpRequests				(HANDLE hUsb, HANDLE hDcp);/********************************************************************************Name:           OsUsbCancelDcpRequestsDescription:    Stops scheduling bulk read requests on DCP pipe.				Arguments:      hUsbOsHal	- bottom HAL handleReturn Value:   noneNotes:			********************************************************************************/__shimcall__void OsUsbCancelDcpRequests				(HANDLE hUsbOsHal);#endif/********************************************************************************Name:           OsUsbResetPipesDescription:    Aborts any transactions-in-progress across USB				Arguments:      hUsbOsHal	- bottom HAL handleReturn Value:   noneNotes:			********************************************************************************/__shimcall__void OsUsbResetPipes					(HANDLE hUsbOsHal);/******************************************************************************** The callback functions below are called from USB completion routines.  We need to be careful not to do any extensive processing in these functions *******************************************************************************//********************************************************************************Name:           UsbHalNotificationReceivedDescription:    Informs top HAL that host has completed read transaction on 				notification pipe				Arguments:      hUpper			- top HAL handle				pDataReceived	- pointer to received data				RecvLength		- size of received dataReturn Value:   needed for top HAL internal processing, should be ignoredNotes:			********************************************************************************/__shimcall__BOOL UsbHalNotificationReceived (PVOID hUpper, PUINT8 pDataReceived, unsigned RecvLength);/********************************************************************************Name:           UsbHalDataReceivedDescription:    Informs top HAL that host has completed read transaction on 				data pipe				Arguments:      hUpper			- top HAL handle				pDataReceived	- pointer to received data				RecvLength		- size of received dataReturn Value:   noneNotes:			********************************************************************************/__shimcall__void UsbHalDataReceived			(PVOID hUpper, PUINT8 pDataReceived, unsigned RecvLength);/********************************************************************************Name:           UsbHalDataTransmitDoneDescription:    Informs top HAL that host has completed write transaction on 				data pipe				Arguments:      hUpper			- top HAL handleReturn Value:   noneNotes:			********************************************************************************/__shimcall__void UsbHalDataTransmitDone		(PVOID hUpper, unsigned TxLength);/********************************************************************************Name:           UsbHalDataTransmitDoneDescription:    Informs top HAL that host has completed write transaction on 				control pipe				Arguments:      hUpper		- top HAL handle				Request		- bRequest field of completed transaction				value		- wValue field of completed transaction				index		- wIndex field of completed transactionReturn Value:   noneNotes:			********************************************************************************/__shimcall__void UsbHalControlTransferDone	(PVOID hUpper, PVOID userContext, UINT8 Request, UINT16 value, UINT16 index);#if TARGET_HCF_FAMILY/********************************************************************************Name:           UsbHalDataTransmitDoneDescription:    Informs top HAL that host has completed write transaction on 				DSP download pipe				Arguments:      hUpper			- top HAL handleReturn Value:   noneNotes:			********************************************************************************/__shimcall__void UsbHalDownloadTransmitDone (PVOID hUpper);#endif// HSF specific control request types (bRequest)typedef enum		{	CD2_GET_INFROMATION,	CD2_UPLOAD_FIRMWARE,	CD2_CONTROL_SCRIPT,	CD2_READ_EEPROM,	CD2_WRITE_EEPROM,	CD2_RESET,	CD2_WAKEONRING} CD2REQUESTTYPE;#pragma pack (1)typedef struct{	UINT8	bmRequestType;	UINT8	bRequest;	UINT16	wValue;	UINT16	wIndex;	UINT16	wLength;	PVOID   pData;} USB_REQUEST_HEADER, *PUSB_REQUEST_HEADER;#pragma pack ()#define MAX_NOTIFY_PACKET	64#ifdef __cplusplus}#endif#endif /* __USBHALOS_H */

⌨️ 快捷键说明

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