Beispiel #1
0
            /// <summary>Create in params structure</summary>
            /// <param name="isSmart">Create for S.M.A.R.T. request</param>
            /// <returns></returns>
            public static SENDCMDINPARAMS Create(Boolean isSmart)
            {
                DiscAPI.SENDCMDINPARAMS result = new DiscAPI.SENDCMDINPARAMS();
                result.irDriveRegs.bSectorCountReg  = 1;
                result.irDriveRegs.bSectorNumberReg = 1;

                /*if(deviceId.HasValue)
                 *      result.irDriveRegs.bDriveHeadReg = (Byte)(0xA0 | ((deviceId & 1) << 4));*/

                if (isSmart)
                {
                    result.irDriveRegs.bCylLowReg  = DiscAPI.IDEREGS.SMART_CYL.LOW;
                    result.irDriveRegs.bCylHighReg = DiscAPI.IDEREGS.SMART_CYL.HI;
                    result.irDriveRegs.bCommandReg = DiscAPI.IDEREGS.IDE.SMART_CMD;
                }
                return(result);
            }
Beispiel #2
0
            /// <summary>Create in params structure</summary>
            /// <param name="isSmart">Create for S.M.A.R.T. request</param>
            /// <returns></returns>
            public static SENDCMDINPARAMS Create(Boolean isSmart)
            {
                DiscAPI.SENDCMDINPARAMS result = new DiscAPI.SENDCMDINPARAMS();
                result.irDriveRegs.bSectorCountReg = 1;
                result.irDriveRegs.bSectorNumberReg = 1;
                /*if(deviceId.HasValue)
                    result.irDriveRegs.bDriveHeadReg = (Byte)(0xA0 | ((deviceId & 1) << 4));*/

                if(isSmart)
                {
                    result.irDriveRegs.bCylLowReg = DiscAPI.IDEREGS.SMART_CYL.LOW;
                    result.irDriveRegs.bCylHighReg = DiscAPI.IDEREGS.SMART_CYL.HI;
                    result.irDriveRegs.bCommandReg = DiscAPI.IDEREGS.IDE.SMART_CMD;
                }
                return result;
            }