ANSI FILE support and related functions

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ANSI FILE support and related functions

711件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by micronpn on Fri Jul 11 04:33:27 MST 2014
I would add a little port of ANSI standard file realted functions (fopen()...fwrite()) to put a layer over open source libraries as fatfs, efs and so on,
I found the redlib FILE struct:

struct __FILE_struct
{
    unsigned char *__ptr;
    int __icnt;      /* two separate _cnt fields so we can police ...        */
    int __ocnt;      /* ... restrictions that read/write are fseek separated */
    int __flag;
/*
* The fields below here are for system use only.
*/
    unsigned char *__base; /* buffer base */
#ifndef FILEHANDLE
#define FILEHANDLE int
#endif
    FILEHANDLE __file;     /* file handle as used by lower level code */
    long __pos;            /* position in file */
    int __bufsiz;          /* maximum buffer size */
    int __signature;       /* used with temporary files */
    struct __extradata *__extrap; /* pointer to information about stream */
};

but I didn't find the definition of struct __extradata.

Where is it defined?

If eventually it is defined in a .c file, Support may you post a copy and paste of it just to see how should I manage it?

Regards,
Massimo
0 件の賞賛
返信
1 返信

699件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Jul 11 11:08:51 MST 2014
I strongly recommend that you do not go down this route and we will only be able to give you very limited assistance in doing this. Implement your own layer, or just use the layers provided by FatFS etc.

Regards,

LPCXpresso Support
0 件の賞賛
返信