📄 tmfat32usb.h
字号:
/* -------------------------------------------------------------------------- *//* (C) Copyright 2000,2002, 2003 Koninklijke Philips Electronics N.V., *//* All rights reserved *//* *//* This source code and any compilation or derivative thereof is the *//* proprietary information of Konlinklijke Philips Electronics N.V. and is *//* Confidential in nature. *//* Under no circumstances is this software to be exposed to or placed under an*//* Open Source License of any type without the expressed written permission of*//* Koninklijke Philips Electronics N.V. *//* -------------------------------------------------------------------------- *//* FILE NAME: tmFat32Usb.h *//* *//* DESCRIPTION: This is the API for tmFat32 USB device driver *//* *//* DOCUMENT REF: tbd *//* *//* NOTES: tbd *//* *//* -------------------------------------------------------------------------- */#ifndef _TMFAT32_USB_H_#define _TMFAT32_USB_H_/* -------------------------------------------------------------------------- *//* Define extern c for C++ prototypes *//* -------------------------------------------------------------------------- */#if defined(__cplusplus)extern "C"{#endif/* -------------------------------------------------------------------------- *//* Types and defines: *//* -------------------------------------------------------------------------- *//* * Useful information about the tmFat32 USB device driver */typedef struct tmFat32_Usb{ tmFat32_Dev_t common; // Info common to all tmFat32 devices Bool installed; // True if installed tmFat32_DeviceDriver_t driver; // Device driver info for tmFat32 UInt32 init_count; // One for each opened volume (partition) Bool connected; // True if connected Bool manageCache; // True if we have to manage cache coherence UInt32 uAppHandle; // App handle for USB SCSI driver UInt32 LogUnitNo; // Logical unit number, e.g., which device in // a USB multicard reader} tmFat32_Usb_t, *ptmFat32_Usb_t;/* -------------------------------------------------------------------------- *//* Exported functions: *//* -------------------------------------------------------------------------- *///-----------------------------------------------------------------------------// FUNCTION: tmFat32_Usb_Install//// DESCRIPTION: Install tmFat32 USB device driver//// RETURN: Pointer ptmFat32_DeviceDriver_t. Return Null on failure.//// NOTES://-----------------------------------------------------------------------------//ptmFat32_DeviceDriver_ttmFat32_Usb_Install ( UInt32 unit // I: Unit number );//-----------------------------------------------------------------------------// FUNCTION: tmFat32_Usb_Uninstall//// DESCRIPTION: Uninstall tmFat32 USB device driver//// RETURN: void//// NOTES://-----------------------------------------------------------------------------//voidtmFat32_Usb_Uninstall ( ptmFat32_DeviceDriver_t p // IO: Pointer to tmFat32_DeviceDriver_t structure );//-----------------------------------------------------------------------------// FUNCTION: tmFat32_Usb_GetInfo//// DESCRIPTION: Get information about USB tmFat32 device driver//// RETURN: void//// NOTES: Return numUnits (number of units supported). No other// fields are set.//-----------------------------------------------------------------------------//voidtmFat32_Usb_GetInfo ( ptmFat32_Dev_t p // IO: Pointer to tmFat32_Dev_t structure);//-----------------------------------------------------------------------------// FUNCTION: tmFat32_Usb_Event//// DESCRIPTION: USB tmFat32 device event notification//// RETURN: tmErrorCode_t: Status of operation (TM_OK = PASS)//// NOTES: This function is called whenever a USB device is inserted// or removed. It must be called by the application after a device// is inserted but before the application mounts a tmFat32 file// system with tmFat32_Init() for this USB device. It should be// called by the application after a device is removed but before// the application dismounts a tmFat32 file system with// tmFat32_Term(). The function passes an array of UInt32 values// which contain the following information://// data[0] Event (TM_FAT32_EVENT_INSERT or TM_FAT32_EVENT_EJECT).// data[1] Unit number for the USB port. First unit is 0.// The following are provided for an insert event only,.// data[2] USB device driver application handle.// data[3] USB device driver logical unit number.// data[4] Capacity, in sectors.// data[5] Sector size, in bytes.//-----------------------------------------------------------------------------//tmErrorCode_ttmFat32_Usb_Event ( UInt32 *data // I: Pointer to data describing the event);/* -------------------------------------------------------------------------- *//* End of extern c for C++ prototypes *//* -------------------------------------------------------------------------- */#if defined(__cplusplus)}#endif#endif /* !defined(_TMFAT32_USB_H_) */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -