00001 /*This file is prepared for Doxygen automatic documentation generation.*/ 00016 /* Copyright (c) 2009 Atmel Corporation. All rights reserved. 00017 * 00018 * Redistribution and use in source and binary forms, with or without 00019 * modification, are permitted provided that the following conditions are met: 00020 * 00021 * 1. Redistributions of source code must retain the above copyright notice, this 00022 * list of conditions and the following disclaimer. 00023 * 00024 * 2. Redistributions in binary form must reproduce the above copyright notice, 00025 * this list of conditions and the following disclaimer in the documentation 00026 * and/or other materials provided with the distribution. 00027 * 00028 * 3. The name of Atmel may not be used to endorse or promote products derived 00029 * from this software without specific prior written permission. 00030 * 00031 * 4. This software may only be redistributed and used in connection with an Atmel 00032 * AVR product. 00033 * 00034 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 00035 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00036 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 00037 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 00038 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00039 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00040 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00041 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00042 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00043 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 00044 * 00045 */ 00046 00047 #ifndef _FSACCESS_H_ 00048 #define _FSACCESS_H_ 00049 00050 00051 //_____ I N C L U D E S ___________________________________________________ 00052 00053 #include <stdio.h> 00054 00055 #include "file.h" 00056 #include "navigation.h" 00057 #include "ctrl_access.h" 00058 00059 #ifndef _FCNTL_ 00060 #define O_RDONLY 0 00061 #define O_WRONLY 0x0001 00062 #define O_RDWR 0x0002 00063 #define O_APPEND 0x0008 00064 #define O_CREAT 0x0200 00065 #endif 00066 00067 typedef signed int ssize_t; 00068 00069 //_____ D E C L A R A T I O N S ____________________________________________ 00070 00071 00084 extern int open(const char *pathname, int flags, ...); 00085 00093 extern size_t fsaccess_file_get_size(int fd); 00094 00104 extern ssize_t read(int fd, void *buf, size_t count); 00105 00115 extern ssize_t write(int fd, const void *buf, size_t count); 00116 00124 extern int close(int fd); 00125 00131 extern long fsaccess_alloc_nav_id( void ); 00132 00138 extern void fsaccess_free_nav_id(int fd); 00139 00143 extern Bool b_fsaccess_init(void); 00144 00148 extern void fsaccess_take_mutex(void); 00149 00153 extern void fsaccess_give_mutex(void); 00154 00162 extern S8 fsaccess_IsDirPresent( const char *pcStringDirName ); 00163 00164 00165 #endif // _FSACCESS_H_