PS2SDK
PS2 Homebrew Libraries
fls.h
Go to the documentation of this file.
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright (c) 2003 Marcus R. Brown <mrbrown@0xd6.org>
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
17 #ifndef __FLS_H__
18 #define __FLS_H__
19 
20 typedef struct {
21  u32 id;
22  u32 mbits;
23  u32 page_bytes; /* bytes/page */
24  u32 block_pages; /* pages/block */
25  u32 blocks;
26 } flash_info_t;
27 
28 extern int flash_detect(void);
29 extern int flash_device_reset(void);
30 extern int flash_get_info(flash_info_t *info);
31 extern int flash_page_erase(flash_info_t *info, u32 page);
32 extern int flash_page_read(flash_info_t *info, u32 page, u32 count, void *buf);
33 extern int flash_page_write(flash_info_t *info, u32 page, void *buf);
34 
35 #define fls_IMPORTS_start DECLARE_IMPORT_TABLE(fls, 1, 1)
36 #define fls_IMPORTS_end END_IMPORT_TABLE
37 
38 #define I_flash_detect DECLARE_IMPORT(4, flash_detect)
39 #define I_flash_device_reset DECLARE_IMPORT(5, flash_device_reset)
40 #define I_flash_get_info DECLARE_IMPORT(6, flash_get_info)
41 #define I_flash_page_erase DECLARE_IMPORT(7, flash_page_erase)
42 #define I_flash_page_read DECLARE_IMPORT(8, flash_page_read)
43 #define I_flash_page_write DECLARE_IMPORT(9, flash_page_write)
44 
45 #endif
s_info
Definition: xprintf.c:78
count
u32 count
start sector of fragmented bd/file
Definition: usbhdfsd-common.h:3
flash_info_t
Definition: fls.h:20