vxKernel/kernel/include/vhex/fs.h

35 lines
796 B
C
Raw Normal View History

VxKernel 0.6.0-17 : Add RTC driver + prepare FS support @add <> include/vhex/display/draw/rect | add filled rectangle API <> src/display/draw/drect | add filled rectangle drawing API <> board/fxcg50/ | add devices special section (WIP) <> include/vhex/device | add device structure (WIP) <> include/vhex/driver/mpu/sh/sh7305/ | [intc] add primitive which allow dummy default interrupt handler | [rtc] add complete RTC hardware structure | [rtc] add hardware-level kernel API <> include/vhex/fs | add file system abstraction API (WIP) | add Fugue FAT file system abstraction API (WIP) <> include/vhex/rtc | add RTC user-level API | add driver-level interface | add kernel-level types <> src/fs | add base Fugue abstraction (WIP) | add libc functions (WIP) @update <> include/vhex/display/draw/text | merge halign and valign argument | add special alignment flags <> include/vhex/driver | add RTC driver flags <> include/vhex/driver/mpu/sh/sh7305/cpg | rename weird field | add Spread Spectrum emulator field | properly expand LSTATS register <> src/driver/mpu/sh/sh7305 | [intc] allow user-level interrupt handler installation | [intc] expose common interrupt handler | [rtc] add RTC entire driver <> src/driver/scree/r61524 | use complete VRAM instead of fragmented render @fix <> src/display | [text] fix height for text display geometry | [text] fix alignment calculation | [dclear] fix geometry support <> src/driver/mpu/sh/sh7305 | [cpg] fix driver installation | [cpg] fix driver spread spectrum | [cpg] fix driver declaration | [tmu] fix exception with the profiling primitives
2022-08-08 20:19:00 +02:00
#ifndef __VHEX_FS_INFORMATION__
# define __VHEX_FS_INFORMATION__
#include <vhex/defs/attributes.h>
#include <vhex/defs/types.h>
#include <vhex/device.h>
/* define the default number of file that can be oppened in the same time */
#ifndef VHEX_NB_FILE
# define VHEX_NB_FILE 8
#endif /* VHEX_NB_FILE */
/* internal file system information */
struct __fs_info {
struct vhex_device fs;
void *table[VHEX_NB_FILE];
};
extern struct __fs_info fs_info;
//---
// Internal API
//---
/* fs_table_reserve() : reserve file descriptor */
extern int fs_table_reserve(void **data);
/* fs_table_find() : find device-specific data */
extern int fs_table_find(void **data, int fd);
/* fs_table_remove() : remove file descriptor */
extern int fs_table_remove(int fd);
#endif /* __VHEX_FS_INFORMATION__ */