FireBirdLib - Topfield TMS PVR TAP Programming Library
HDD_Smart_ReturnStatus.c
Go to the documentation of this file.
1
#include "
FBLib_hdd.h
"
2
#include "
libFireBird.h
"
3
4
int
HDD_Smart_ReturnStatus
(
void
)
5
{
6
TRACEENTER
();
7
8
unsigned
char
CommandBlock[
FBHDIO_DRIVE_TASK_HDR_SIZE
] = {
WIN_SMART
,
//COMMAND
9
SMART_STATUS
,
//FEATURE
10
0x00,
//NSECTOR
11
0,
//SECTOR
12
0x4f,
//LCYL
13
0xc2,
//HCYL
14
0,
//SELECT
15
0};
//COMMAND
16
17
if
(
SendHDDCommand
(
HDIO_DRIVE_TASK
, CommandBlock, 0))
18
{
19
TRACEEXIT
();
20
return
19;
21
}
22
23
if
((CommandBlock[4] == 0x4f) && (CommandBlock[5] == 0xc2))
24
{
25
TRACEEXIT
();
26
return
0;
27
}
28
29
if
((CommandBlock[4] == 0xf4) && (CommandBlock[5] == 0x2c))
30
{
31
TRACEEXIT
();
32
return
20;
33
}
34
35
TRACEEXIT
();
36
return
19;
37
}
FBLib_hdd.h
SendHDDCommand
int SendHDDCommand(dword, const byte *, int)
Definition:
SendHDDCommand.c:4
WIN_SMART
#define WIN_SMART
Definition:
FBLib_hdd.h:39
HDIO_DRIVE_TASK
#define HDIO_DRIVE_TASK
Definition:
FBLib_hdd.h:51
SMART_STATUS
#define SMART_STATUS
Definition:
FBLib_hdd.h:42
FBHDIO_DRIVE_TASK_HDR_SIZE
#define FBHDIO_DRIVE_TASK_HDR_SIZE
Definition:
FBLib_hdd.h:38
HDD_Smart_ReturnStatus
int HDD_Smart_ReturnStatus(void)
Definition:
HDD_Smart_ReturnStatus.c:4
libFireBird.h
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
hdd
HDD_Smart_ReturnStatus.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3