sdk-core
v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Toggle main menu visibility
Loading...
Searching...
No Matches
hdd_blkio.h
Go to the documentation of this file.
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# Copyright 2001-2004, 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
15
#ifndef _HDD_BLKIO_H
16
#define _HDD_BLKIO_H
17
18
#ifdef APA_USE_ATAD
19
#include <
atad.h
>
20
21
#define BLKIO_MAX_VOLUMES 2
22
23
#define BLKIO_DIR_READ ATA_DIR_READ
24
#define BLKIO_DIR_WRITE ATA_DIR_WRITE
25
26
static
inline
int
blkIoInit(
void
)
27
{
28
return
0;
29
}
30
31
static
inline
int
blkIoDmaTransfer(
int
device,
void
*buf, u32 lba, u32 nsectors,
int
dir)
32
{
33
return
sceAtaDmaTransfer(device, buf, lba, nsectors, dir);
34
}
35
36
static
inline
int
blkIoIdle(
int
device,
int
period)
37
{
38
return
sceAtaIdle(device, period);
39
}
40
41
static
inline
int
blkIoGetSceId(
int
device,
void
*data)
42
{
43
return
sceAtaGetSceId(device, data);
44
}
45
46
static
inline
int
blkIoSmartReturnStatus(
int
device)
47
{
48
return
sceAtaSmartReturnStatus(device);
49
}
50
51
static
inline
int
blkIoSmartSaveAttr(
int
device)
52
{
53
return
sceAtaSmartSaveAttr(device);
54
}
55
56
static
inline
int
blkIoFlushCache(
int
device)
57
{
58
return
sceAtaFlushCache(device);
59
}
60
61
static
inline
int
blkIoIdleImmediate(
int
device)
62
{
63
return
sceAtaIdleImmediate(device);
64
}
65
#else
66
#define BLKIO_MAX_VOLUMES 10
67
68
#define BLKIO_DIR_READ 0
69
#define BLKIO_DIR_WRITE 1
70
71
extern
int
blkIoInit(
void
);
72
extern
int
blkIoDmaTransfer(
int
device,
void
*buf, u32 lba, u32 nsectors,
int
dir);
73
extern
int
blkIoIdle(
int
device,
int
period);
74
extern
int
blkIoGetSceId(
int
device,
void
*data);
75
extern
int
blkIoSmartReturnStatus(
int
device);
76
extern
int
blkIoSmartSaveAttr(
int
device);
77
extern
int
blkIoFlushCache(
int
device);
78
extern
int
blkIoIdleImmediate(
int
device);
79
80
#ifdef APA_USE_IOMANX
81
extern
int
hdd_blkio_vhdd_mount(
int
slot,
const
char
*filename);
82
extern
int
hdd_blkio_vhdd_umount(
int
slot);
83
#endif
84
#endif
85
86
#endif
/* _HDD_BLKIO_H */
atad.h
core
apa
src
hdd_blkio.h
Generated by
1.18.0