⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pseudoftl.c

📁 s3c2450 bsp for wince 5.0 经验证,完全没问题
💻 C
📖 第 1 页 / 共 3 页
字号:
/* RETURN VALUES                                                             */
/*		FTL_SUCCESS															 */
/*				FTL_Close is completed										 */
/* NOTES                                                                     */
/*                                                                           */
/*****************************************************************************/
INT32
FTL_Close(VOID)
{
    FTLPacket   stPacket;
    UINT32      nResult;

    FTLP_LOG_PRINT((TEXT("[FTLP: IN] ++FTL_Close()\r\n")));

    do {
        /* FTL_Close */
        stPacket.nCtrlCode  = PM_HAL_FTL_CLOSE;
        stPacket.nLsn       = 0;
        stPacket.nNumOfScts = 0;
        stPacket.pBuf       = NULL;
        stPacket.pTotalScts = NULL;

        KernelIoControl(IOCTL_POCKETSTOREII_CMD,  /* IO Control Code */
                        &stPacket,                /* Input buffer (Additional Control Code) */
                        sizeof(FTLPacket),        /* Size of Input buffer */
                        NULL,                     /* Output buffer */
                        0,                        /* Size of Output buffer */
                        &nResult);                /* Error Return */

        if (nResult != FTL_SUCCESS)
        {
            FTLP_ERR_PRINT((TEXT("[FTLP:ERR]  FTL_Close() failure. ERR Code=%x\r\n"), nResult));
            break;
        }

    } while(0);

    FTLP_LOG_PRINT((TEXT("[FTLP:OUT] --FTL_Close()\r\n")));

    return (INT32)nResult;
}


/*****************************************************************************/
/*                                                                           */
/* NAME                                                                      */
/*      FTL_FormatProc		                                                 */
/* DESCRIPTION                                                               */
/*      This function formats ftl in line process.							 */
/* PARAMETERS                                                                */
/*		none																 */
/* RETURN VALUES                                                             */
/*		FTL_SUCCESS															 */
/*				FTL_FormatProc is completed									 */
/*		FTL_CRITICAL_ERROR													 */
/*				FTL_FormatProc is failed									 */
/* NOTES                                                                     */
/*                                                                           */
/*****************************************************************************/
INT32
FTL_FormatProc(VOID)
{
    FTLPacket   stPacket;
    UINT32      nResult;

    FTLP_LOG_PRINT((TEXT("[FTLP: IN] ++FTL_FormatProc()\r\n")));

    do {
        /* FTL_FormatProc */
        stPacket.nCtrlCode  = PM_HAL_FTL_FORMATPROC;
        stPacket.nLsn       = 0;
        stPacket.nNumOfScts = 0;
        stPacket.pBuf       = NULL;
        stPacket.pTotalScts = NULL;

        KernelIoControl(IOCTL_POCKETSTOREII_CMD,  /* Io Control Code */
                        &stPacket,                /* Input buffer (Additional Control Code) */
                        sizeof(FTLPacket),        /* Size of Input buffer */
                        NULL,                     /* Output buffer */
                        0,                        /* Size of Output buffer */
                        &nResult);                /* Error Return */

        if (nResult != FTL_SUCCESS)
        {
            FTLP_ERR_PRINT((TEXT("[FTLP:ERR]  FTL_FormatProc() failure. ERR Code=%x\r\n"), nResult));

            break;
        }

    } while(0);

    FTLP_LOG_PRINT((TEXT("[FTLP:OUT] --FTL_FormatProc()\r\n")));

    return (INT32)nResult;
}

/*****************************************************************************/
/*                                                                           */
/* NAME                                                                      */
/*      WMR_Format_FIL		                                                 */
/* DESCRIPTION                                                               */
/*      This function formats fil in line process.							 */
/* PARAMETERS                                                                */
/*		none																 */
/* RETURN VALUES                                                             */
/*		TRUE32  															 */
/*				WMR_Format_FIL is completed									 */
/*		FALSE32																 */
/*				WMR_Format_FIL is failed									 */
/* NOTES                                                                     */
/*                                                                           */
/*****************************************************************************/
BOOL32
WMR_Format_FIL(VOID)
{
    FTLPacket   stPacket;
    UINT32      nResult;

    FTLP_LOG_PRINT((TEXT("[FTLP: IN] ++WMR_Format_FIL()\r\n")));

    do {
        /* WMR_Format_FTL */
        stPacket.nCtrlCode  = PM_HAL_WMR_FORMAT_FIL;
        stPacket.nLsn       = 0;
        stPacket.nNumOfScts = 0;
        stPacket.pBuf       = NULL;
        stPacket.pTotalScts = NULL;

        KernelIoControl(IOCTL_POCKETSTOREII_CMD,  /* Io Control Code */
                        &stPacket,                /* Input buffer (Additional Control Code) */
                        sizeof(FTLPacket),        /* Size of Input buffer */
                        NULL,                     /* Output buffer */
                        0,                        /* Size of Output buffer */
                        &nResult);                /* Error Return */

        if (nResult == FALSE32)
        {
            FTLP_ERR_PRINT((TEXT("[FTLP:ERR]  WMR_Format_FIL() failure. ERR Code=%x\r\n"), nResult));

            break;
        }

    } while(0);

    FTLP_LOG_PRINT((TEXT("[FTLP:OUT] --WMR_Format_FIL()\r\n")));

    return (INT32)nResult;
}


/*****************************************************************************/
/*                                                                           */
/* NAME                                                                      */
/*      WMR_Format_VFL		                                                 */
/* DESCRIPTION                                                               */
/*      This function formats vfl in line process.							 */
/* PARAMETERS                                                                */
/*		none																 */
/* RETURN VALUES                                                             */
/*		TRUE32  															 */
/*				WMR_Format_VFL is completed									 */
/*		FALSE32																 */
/*				WMR_Format_VFL is failed									 */
/* NOTES                                                                     */
/*                                                                           */
/*****************************************************************************/
BOOL32
WMR_Format_VFL(VOID)
{
    FTLPacket   stPacket;
    UINT32      nResult;

    FTLP_LOG_PRINT((TEXT("[FTLP: IN] ++WMR_Format_VFL()\r\n")));

    do {
        /* WMR_Format_FTL */
        stPacket.nCtrlCode  = PM_HAL_WMR_FORMAT_VFL;
        stPacket.nLsn       = 0;
        stPacket.nNumOfScts = 0;
        stPacket.pBuf       = NULL;
        stPacket.pTotalScts = NULL;

        KernelIoControl(IOCTL_POCKETSTOREII_CMD,  /* Io Control Code */
                        &stPacket,                /* Input buffer (Additional Control Code) */
                        sizeof(FTLPacket),        /* Size of Input buffer */
                        NULL,                     /* Output buffer */
                        0,                        /* Size of Output buffer */
                        &nResult);                /* Error Return */

        if (nResult == FALSE32)
        {
            FTLP_ERR_PRINT((TEXT("[FTLP:ERR]  WMR_Format_VFL() failure. ERR Code=%x\r\n"), nResult));

            break;
        }

    } while(0);

    FTLP_LOG_PRINT((TEXT("[FTLP:OUT] --WMR_Format_VFL()\r\n")));

    return (INT32)nResult;
}


/*****************************************************************************/
/*                                                                           */
/* NAME                                                                      */
/*      WMR_Format_FTL		                                                 */
/* DESCRIPTION                                                               */
/*      This function formats ftl in line process.							 */
/* PARAMETERS                                                                */
/*		none																 */
/* RETURN VALUES                                                             */
/*		TRUE32  															 */
/*				WMR_Format_FTL is completed									 */
/*		FALSE32																 */
/*				WMR_Format_FTL is failed									 */
/* NOTES                                                                     */
/*                                                                           */
/*****************************************************************************/
BOOL32
WMR_Format_FTL(VOID)
{
    FTLPacket   stPacket;
    UINT32      nResult;

    FTLP_LOG_PRINT((TEXT("[FTLP: IN] ++WMR_Format_FTL()\r\n")));

    do {
        /* WMR_Format_FTL */
        stPacket.nCtrlCode  = PM_HAL_WMR_FORMAT_FTL;
        stPacket.nLsn       = 0;
        stPacket.nNumOfScts = 0;
        stPacket.pBuf       = NULL;
        stPacket.pTotalScts = NULL;

        KernelIoControl(IOCTL_POCKETSTOREII_CMD,  /* Io Control Code */
                        &stPacket,                /* Input buffer (Additional Control Code) */
                        sizeof(FTLPacket),        /* Size of Input buffer */
                        NULL,                     /* Output buffer */
                        0,                        /* Size of Output buffer */
                        &nResult);                /* Error Return */

        if (nResult == FALSE32)
        {
            FTLP_ERR_PRINT((TEXT("[FTLP:ERR]  WMR_Format_FTL() failure. ERR Code=%x\r\n"), nResult));

            break;
        }

    } while(0);

    FTLP_LOG_PRINT((TEXT("[FTLP:OUT] --WMR_Format_FTL()\r\n")));

    return (INT32)nResult;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -