PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
acflash_internal.h
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright ps2dev - http://www.ps2dev.org
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
11#ifndef _ACFLASH_INTERNAL_H
12#define _ACFLASH_INTERNAL_H
13
14#include <acflash.h>
15#include <irx_imports.h>
16
17typedef acUint16 flash_data_t;
18typedef acUint32 flash_addr_t;
19typedef volatile flash_data_t *flash_ptr_t;
20
22{
23 // cppcheck-suppress unusedStructMember
24 char *fo_name;
25 acUint32 fo_bsize;
26 acUint32 fo_blocks;
27 // cppcheck-suppress unusedStructMember
28 int fo_padding;
29 int (*fo_erase)(flash_addr_t addr);
30 int (*fo_program)(flash_addr_t addr, const flash_data_t *buf, int size);
31 int (*fo_reset)(flash_addr_t addr);
32 int (*fo_status)(flash_addr_t addr);
33};
34
35typedef struct flash_ops *flash_ops_t;
36
38{
39 acInt32 status;
40 acInt32 size;
41 flash_ops_t ops;
42 acUint32 padding;
43};
44
45typedef flash_ops_t (*flash_probe_t)(flash_addr_t addr);
46
47extern flash_ops_t flash_probe_i28f640f5(flash_addr_t addr);
48extern flash_ops_t flash_probe_mbm29f033c(flash_addr_t addr);
49
50#endif