📄 usbhalutil.c
字号:
/* usbHalUtil.c - Utility functions of HAL *//* Copyright 2004 Wind River Systems, Inc. *//*Modification history--------------------01b,19jul04,ami Coding Convention Changes01a,08mar04,pdg First.*//*DESCRIPTIONThis file defines the utility functions which are used by the sub-modules ofthe Hardware Adaption Layer.INCLUDE FILES: usb/target/usbTcd.h, string.h*//* includes */#include "usb/target/usbTcd.h" #include <string.h> /********************************************************************************* trbHeaderInit - initialize a TCD request block header** This function is used to initialize the TCD block header for different * function codes which is passed to the target controller driver.** RETURNS: N/A** ERRNO:* None.** \NOMANUAL*/VOID trbHeaderInit ( pTRB_HEADER pTrb, /* TCD request block header */ pVOID pTCDHandle, /* identifier for the TCD */ UINT16 uFunctionCode, /* function code */ UINT16 uTotalLen /* total length of the TRB */ ) { /* Initialize the TRB */ memset (pTrb, 0, uTotalLen); pTrb->handle = pTCDHandle; pTrb->function = uFunctionCode; pTrb->trbLength = uTotalLen; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -