Nut/OS  4.10.3
API Reference
fat.h
Go to the documentation of this file.
00001 /****************************************************************************
00002 *  This file is part of the AVRIDE device driver.
00003 *
00004 *  Copyright (c) 2002-2003 by Michael Fischer. All rights reserved.
00005 *
00006 *  Redistribution and use in source and binary forms, with or without 
00007 *  modification, are permitted provided that the following conditions 
00008 *  are met:
00009 *  
00010 *  1. Redistributions of source code must retain the above copyright 
00011 *     notice, this list of conditions and the following disclaimer.
00012 *  2. Redistributions in binary form must reproduce the above copyright
00013 *     notice, this list of conditions and the following disclaimer in the 
00014 *     documentation and/or other materials provided with the distribution.
00015 *  3. Neither the name of the author nor the names of its contributors may 
00016 *     be used to endorse or promote products derived from this software 
00017 *     without specific prior written permission.
00018 *
00019 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
00020 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
00021 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
00022 *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 
00023 *  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
00024 *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
00025 *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 
00026 *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
00027 *  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
00028 *  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 
00029 *  THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
00030 *  SUCH DAMAGE.
00031 *
00032 ****************************************************************************
00033 *  History:
00034 *
00035 *  14.12.02  mifi   First Version 
00036 *  18.01.03  mifi   Change Licence from GPL to BSD
00037 *  25.01.03  mifi   Change FAT32Init 
00038 *                   New function FAT32MountDrive and FAT32UnMountDrive
00039 *                   Remove FAT32_MAX_FILES, a file handle will be 
00040 *                   allocated by NutHeapAlloc, therefore we have no
00041 *                   restrictions about the count of the open file handle.
00042 *                   (Only by available memory)
00043 *  27.01.03  mifi   Rename all FAT32xxx function to FATxxx.
00044 *
00045 *  28.01.03  mifi   Start porting to Nut/OS 3.X.X
00046 *  29.06.03  mifi   First ATAPI-Version
00047 ****************************************************************************/
00048 #ifndef __FAT_H__
00049 #define __FAT_H__
00050 
00051 #include <sys/device.h>
00052 
00053 /*-------------------------------------------------------------------------*/
00054 /* global defines                                                          */
00055 /*-------------------------------------------------------------------------*/
00056 
00057 //
00058 // Device mode
00059 //
00060 #define FAT_MODE_IDE_HD         0x0001
00061 #define FAT_MODE_IDE_HD_7MHZ    0x0002
00062 #define FAT_MODE_IDE_CF         0x0003
00063 #define FAT_MODE_MEM_CF         0x0004
00064 
00065 /*-------------------------------------------------------------------------*/
00066 /* global types                                                            */
00067 /*-------------------------------------------------------------------------*/
00068 
00069 /*-------------------------------------------------------------------------*/
00070 /* global macros                                                           */
00071 /*-------------------------------------------------------------------------*/
00072 
00073 /*-------------------------------------------------------------------------*/
00074 /* Prototypes                                                              */
00075 /*-------------------------------------------------------------------------*/
00076 extern NUTDEVICE devFATC;
00077 
00078 #endif                          /* !__FAT_H__ */