source: soft/giet_vm/giet_fat32/fat32_shared.h @ 663

Last change on this file since 663 was 663, checked in by guerin, 9 years ago

fat32: introduce fat32_shared.h

No need to synchronize fat32.h and stdio.h anymore.

File size: 1.9 KB
Line 
1////////////////////////////////////////////////////////////////////////////////
2// File     : fat32_shared.h
3// Date     : 27/07/2015
4// Author   : Clément Guérin
5// Copyright (c) UPMC-LIP6
6////////////////////////////////////////////////////////////////////////////////
7
8#ifndef _FAT32_SHARED
9#define _FAT32_SHARED
10
11/********************************************************************************
12  This struct is used by _fat_file_info().
13********************************************************************************/
14
15typedef struct fat_file_info_s
16{
17    unsigned int size;      // size in bytes
18    unsigned int offset;    // offset in bytes
19    unsigned int is_dir;    // is the file a directory
20}   fat_file_info_t;
21
22/********************************************************************************
23  This struct is used by _fat_readdir(). It describes a directory entry.
24********************************************************************************/
25
26typedef struct fat_dirent_s
27{
28    unsigned int cluster;   // cluster index
29    unsigned int size;      // size in bytes
30    unsigned int is_dir;    // is the entry a directory
31    char name[36];          // entry name
32}   fat_dirent_t;
33
34/********************************************************************************
35  _fat_open() flags.
36********************************************************************************/
37
38#define O_RDONLY                0x01
39#define O_TRUNC                 0x10
40#define O_CREATE                0x20
41
42/********************************************************************************
43  _fat_lseek() flags.
44********************************************************************************/
45
46#define SEEK_SET                0
47#define SEEK_CUR                1
48
49#endif // _FAT32_SHARED
50
51// Local Variables:
52// tab-width: 4
53// c-basic-offset: 4
54// c-file-offsets:((innamespace . 0)(inline-open . 0))
55// indent-tabs-mode: nil
56// End:
57// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
58
Note: See TracBrowser for help on using the repository browser.