Changeset 663


Ignore:
Timestamp:
Jul 27, 2015, 5:56:15 PM (9 years ago)
Author:
guerin
Message:

fat32: introduce fat32_shared.h

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

Location:
soft/giet_vm
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_fat32/fat32.h

    r661 r663  
    99#define _FAT32_H
    1010
     11#include "fat32_shared.h"
    1112#include "giet_config.h"
    1213#include "kernel_locks.h"
     
    125126
    126127#define FAT_INITIALISED         0xBABEF00D
    127 
    128 #ifndef _FAT32_SHARED
    129 #define _FAT32_SHARED
    130 typedef struct fat_file_info_s
    131 {
    132     unsigned int size;
    133     unsigned int offset;
    134     unsigned int is_dir;
    135 }   fat_file_info_t;
    136 
    137 typedef struct fat_dirent_s
    138 {
    139     unsigned int cluster;
    140     unsigned int size;
    141     unsigned int is_dir;
    142     char name[36];
    143 }   fat_dirent_t;
    144 
    145 #define SEEK_SET                0
    146 #define SEEK_CUR                1
    147 
    148 #define O_RDONLY                0x01
    149 #define O_TRUNC                 0x10
    150 #define O_CREATE                0x20
    151 #endif // _FAT32_SHARED
    152128
    153129/********************************************************************************
  • soft/giet_vm/giet_libs/stdio.h

    r661 r663  
    1212#ifndef _STDIO_H
    1313#define _STDIO_H
     14
     15#include "giet_fat32/fat32_shared.h"
    1416
    1517// These define must be synchronised with
     
    8385#define SYSCALL_COPROC_RUN           0x3E
    8486#define SYSCALL_COPROC_RELEASE       0x3F
    85 
    86 ////////////////////////////////////////////////////////////////////////////
    87 // These define must be synchronised vith values defined in fat32.h
    88 ////////////////////////////////////////////////////////////////////////////
    89 
    90 #ifndef _FAT32_SHARED
    91 #define _FAT32_SHARED
    92 typedef struct fat_file_info_s
    93 {
    94     unsigned int size;
    95     unsigned int offset;
    96     unsigned int is_dir;
    97 }   fat_file_info_t;
    98 
    99 typedef struct fat_dirent_s
    100 {
    101     unsigned int cluster;
    102     unsigned int size;
    103     unsigned int is_dir;
    104     char name[36];
    105 }   fat_dirent_t;
    106 
    107 #define SEEK_SET            0          // argument for giet_fat_lseek()
    108 #define SEEK_CUR            1          // argument for giet_fat_lseek
    109 
    110 #define O_RDONLY            0x01       // argument for giet_fat_open()
    111 #define O_TRUNC             0x10       // argument for giet_fat_open()
    112 #define O_CREATE            0x20       // argument for giet_fat_open()
    113 #endif // _FAT32_SHARED
    11487
    11588////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.