leotestunit.c
2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* F i l e N a m e : l e o t e s t u n i t . c
*
****************************************************************************
* (C) Copyright ALPS Electric Co., Ltd. 1995-1996
****************************************************************************
* Version:
*
* ver date
* ---- ---------
* 1.03 '96-11-05 Add leoChk_cur_drvmode().
* 1.02 '96-09-17 Change leoTest_unit_rdy() function.
* 1.01 '96-02-27 Rename file name testunit.c to leotestunit.c .
* 1.00 '95-12-20 Initial Revision.
****************************************************************************
*/
#include "os.h"
#include <ultra64.h>
#include "leodefine.h"
#include "leomacro.h"
#include "leoappli.h"
/*************************************/
/* PROTOTYPE */
/*************************************/
void leoTest_unit_rdy(void);
/*************************************/
/* EXTERNAL RAMs */
/*************************************/
extern OSMesg LEOcur_command;
extern OSPiHandle *LEOPiInfo;
/*************************************/
/* MACROS */
/*************************************/
#define tur_cmd ((LEOCmdTestUnitReady *)LEOcur_command)
/* ==========================================================================
* Function : leoTest_unit_rdy
* --------------------------------------------------------------------------
* Description : Excute test_unit_ready command
* --------------------------------------------------------------------------
* IN : LEOcur_command
* OUT : *LEOcur_command
* ARG : non
* RET : non
* ==========================================================================
*/
void leoTest_unit_rdy(void)
{
/* This function is called TEST_UNIT_READY GOOD case only */
tur_cmd->test = leoChk_cur_drvmode();
#ifdef _ERRCHK
if (tur_cmd->header.sense = tur_cmd->header.reserve1 )
tur_cmd->header.status = LEO_STATUS_CHECK_CONDITION;
else
tur_cmd->header.status = LEO_STATUS_GOOD;
#else
tur_cmd->header.sense = LEO_SENSE_NO_ADDITIONAL_SENSE_INFOMATION;
tur_cmd->header.status = LEO_STATUS_GOOD;
#endif
}