PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
hdd_blkio.h
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
11#ifndef _HDD_BLKIO_H
12#define _HDD_BLKIO_H
13
14#include <atad.h>
15
16#define BLKIO_MAX_VOLUMES 2
17
18#define BLKIO_DIR_READ ATA_DIR_READ
19#define BLKIO_DIR_WRITE ATA_DIR_WRITE
20
21static inline int blkIoInit(void)
22{
23 return 0;
24}
25
26static inline int blkIoDmaTransfer(int device, void *buf, u32 lba, u32 nsectors, int dir)
27{
28 return sceAtaDmaTransfer(device, buf, lba, nsectors, dir);
29}
30
31static inline int blkIoIdle(int device, int period)
32{
33 return sceAtaIdle(device, period);
34}
35
36static inline int blkIoGetSceId(int device, void *data)
37{
38 return sceAtaGetSceId(device, data);
39}
40
41static inline int blkIoSmartReturnStatus(int device)
42{
43 return sceAtaSmartReturnStatus(device);
44}
45
46static inline int blkIoSmartSaveAttr(int device)
47{
48 return sceAtaSmartSaveAttr(device);
49}
50
51static inline int blkIoFlushCache(int device)
52{
53 return sceAtaFlushCache(device);
54}
55
56static inline int blkIoIdleImmediate(int device)
57{
58 return sceAtaIdleImmediate(device);
59}
60
61#endif /* _HDD_BLKIO_H */