Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #if defined ( __ICCARM__ )
00010
00011 #include "ff.h"
00012
00013 #include <stdio.h>
00014 #include <stdint.h>
00015 #include <stddef.h>
00016 #include <yfuns.h>
00017
00018 extern size_t __write( int handle, const unsigned char *buf, size_t bufSize )
00019 {
00020 size_t nChars = 0 ;
00021
00022
00023 if ( handle == -1 )
00024 {
00025 return 0 ;
00026 }
00027
00028
00029 if ( handle != 1 && handle != 2 )
00030 {
00031
00032 return 0xfffffff ;
00033 }
00034
00035 f_write ((FIL *)handle, buf, (UINT)bufSize, (UINT *)&nChars);
00036
00037 return nChars ;
00038 }
00039
00040
00041 extern size_t __read( int handle, unsigned char *buf, size_t bufSize )
00042 {
00043 size_t nChars = 0 ;
00044
00045
00046 if ( handle != 0 )
00047 {
00048
00049 return 0xfffffff ;
00050 }
00051
00052 f_read ((FIL *)handle, buf, (UINT)bufSize,(UINT *) nChars);
00053
00054 return nChars ;
00055 }
00056
00057 extern long __lseek(int handle, long offset, int whence)
00058 {
00059 return -1;
00060 }
00061
00062 extern int __close(int handle)
00063 {
00064 return 0;
00065 }
00066
00067 extern int remove(const char * filename)
00068 {
00069 return 0;
00070 }
00071 #endif