PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
api.c
1
#include <
stdio.h
>
2
#include <
errno.h
>
3
4
#ifdef WIN32
5
#include <memory.h>
6
#include <string.h>
7
#include <stdlib.h>
8
#else
9
#include <
cdvdman.h
>
10
#include <
sysclib.h
>
11
#endif
12
13
#include <
usbhdfsd.h
>
14
#include "usbhd_common.h"
15
#include "scache.h"
16
#include "mass_stor.h"
17
18
// #define DEBUG //comment out this line when not debugging
19
20
#include "mass_debug.h"
21
22
#define READ_SECTOR(d, a, b) scache_readSector((d)->cache, (a), (b))
23
#define WRITE_SECTOR(d, a) scache_writeSector((d)->cache, (a))
24
#define FLUSH_SECTORS(d) scache_flushSectors((d)->cache)
25
26
int
UsbMassReadSector(
fat_driver
*fatd,
void
**buffer, u32 sector)
27
{
28
return
READ_SECTOR(fatd->dev, sector, buffer);
29
}
30
31
int
UsbMassWriteSector(
fat_driver
*fatd, u32 sector)
32
{
33
return
WRITE_SECTOR(fatd->dev, sector);
34
}
35
36
void
UsbMassFlushCache(
fat_driver
*fatd)
37
{
38
FLUSH_SECTORS(fatd->dev);
39
}
cdvdman.h
errno.h
stdio.h
sysclib.h
usbhdfsd.h
_fat_driver
Definition
fat_driver.h:43
iop
usb
usbhdfsd
src
api.c
Generated on Tue Feb 11 2025 21:36:00 for PS2SDK by
1.12.0