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

📄 csl_ataaux.h

📁 TI达芬奇dm644x各硬件模块测试代码
💻 H
📖 第 1 页 / 共 5 页
字号:
     @endverbatim * *   <b> Return Value </b>  CSL_AtaIodftMisr * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  None * *   @b Modifies *   @n None * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        CSL_AtaIodftMisr   response;        response = CSL_ataGetMISRResult (hAta);     @endverbatim *  ============================================================================ */CSL_IDEF_INLINECSL_AtaIodftMisr CSL_ataGetMISRResult (    CSL_AtaHandle                       hAta){    CSL_AtaIodftMisr  response;    response.misr  = (Uint32) hAta->regs->IODFTM.TLMR;    response.misr2 = (Uint32) hAta->regs->IODFTM.TLMR2;    response.misr3 = (Uint32) hAta->regs->IODFTM.TLMR3;    return response;}/* *  Control command functions of ATA *//* FOR PRIMARY *//** ============================================================================ *   @n@b CSL_ataP_PIOEnable * *   @b Description *      Enables IDE Decode. PIO transactions decoded. * *   @b Arguments *   @verbatim        hAta         Handle to the ATA instance     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  PIO transactions decoded. * *   @b Modifies *   @n ata IDETIMP register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        ...        CSL_ataP_PIOEnable (hAta);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataP_PIOEnable (    CSL_AtaHandle         hAta){    CSL_FINS(hAta->regs->CONFIG.IDETIMP, ATA_IDETIMP_IDEEN, 1);}/** ============================================================================ *   @n@b CSL_ataP_PIODisable * *   @b Description *      PIO transactions not decoded. * *   @b Arguments *   @verbatim        hAta         Handle to the ATA instance     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  PIO transactions not decoded. * *   @b Modifies *   @n ata IDETIMP register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        ...        CSL_ataP_PIODisable (hAta);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataP_PIODisable (    CSL_AtaHandle          hAta){    CSL_FINS(hAta->regs->CONFIG.IDETIMP, ATA_IDETIMP_IDEEN, 0);}/** ============================================================================ *   @n@b CSL_ataP_DMAStartRead * *   @b Description *      Starts DMA operation read from device. * *   @b Arguments *   @verbatim        hAta         Handle to the ATA instance        loadVal      Value to be loaded into the register     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  Starts DMA operation of reading. * *   @b Modifies *   @n ata BMIDTPP, UDMACTL, BMICP register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        Uint32             loadVal;        ...        CSL_ataP_DMAStartRead (hAta, loadVal);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataP_DMAStartRead (    CSL_AtaHandle            hAta,    Uint32                   loadVal){    if (loadVal != NULL) {        /* if "loadVal" is non-NULL, it specifies DMA Descriptor pointer */        CSL_FINS(hAta->regs->DMAENGINE.BMIDTPP, ATA_BMIDTPP_BMIDTP,                 (((Uint32) loadVal) >> 2));    }    /* configure for MW-DMA */    CSL_FINS(hAta->regs->CONFIG.UDMACTL, ATA_UDMACTL_UDMAP0, 0);    CSL_FINS(hAta->regs->CONFIG.UDMACTL, ATA_UDMACTL_UDMAP1, 0);    /* read from device */    CSL_FINS(hAta->regs->DMAENGINE.BMICP, ATA_BMICP_DMADIR, 1);    CSL_FINS(hAta->regs->DMAENGINE.BMICP, ATA_BMICP_DMASTART, 1);}/** ============================================================================ *   @n@b CSL_ataP_DMAStartWrite * *   @b Description *      Starts DMA operation write from device. * *   @b Arguments *   @verbatim        hAta         Handle to the ATA instance        loadVal      Value to be loaded into the register     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  Starts DMA operation of writing. * *   @b Modifies *   @n ata BMIDTPP, UDMACTL, BMICP register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        Uint32             loadVal;        ...        CSL_ataP_DMAStartWrite (hAta, loadVal);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataP_DMAStartWrite (    CSL_AtaHandle             hAta,    Uint32                    loadVal){    if (loadVal != NULL) {        /* if "loadVal" is non-NULL, it specifies DMA Descriptor pointer */        CSL_FINS(hAta->regs->DMAENGINE.BMIDTPP, ATA_BMIDTPP_BMIDTP,                 (((Uint32) loadVal) >> 2));    }    /* configure for MW-DMA */    CSL_FINS(hAta->regs->CONFIG.UDMACTL, ATA_UDMACTL_UDMAP0, 0);    CSL_FINS(hAta->regs->CONFIG.UDMACTL, ATA_UDMACTL_UDMAP1, 0);    /* write to device */    CSL_FINS(hAta->regs->DMAENGINE.BMICP, ATA_BMICP_DMADIR, 0);    CSL_FINS(hAta->regs->DMAENGINE.BMICP, ATA_BMICP_DMASTART, 1);}/** ============================================================================ *   @n@b CSL_ataP_UDMAStartRead * *   @b Description *      Starts UDMA operation of reading. * *   @b Arguments *   @verbatim        hAta         Handle to the ATA instance        loadVal      Value to be loaded into the register     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  Starts UDMA operation of reading. * *   @b Modifies *   @n ata BMIDTPP, UDMACTL, BMICP register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        Uint32             loadVal;        ...        CSL_ataP_UDMAStartRead (hAta, loadVal);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataP_UDMAStartRead (    CSL_AtaHandle             hAta,    Uint32                    loadVal){    if (loadVal != NULL) {        /* if "loadVal" is non-NULL, it specifies DMA Descriptor pointer */        CSL_FINS(hAta->regs->DMAENGINE.BMIDTPP, ATA_BMIDTPP_BMIDTP,                 (((Uint32) loadVal) >> 2));    }    /* configure for UDMA */    CSL_FINS(hAta->regs->CONFIG.UDMACTL, ATA_UDMACTL_UDMAP0, 1);    CSL_FINS(hAta->regs->CONFIG.UDMACTL, ATA_UDMACTL_UDMAP1, 1);    /* read from device */    CSL_FINS(hAta->regs->DMAENGINE.BMICP, ATA_BMICP_DMADIR, 1);    CSL_FINS(hAta->regs->DMAENGINE.BMICP, ATA_BMICP_DMASTART, 1);}/** ============================================================================ *   @n@b CSL_ataP_UDMAStartWrite * *   @b Description *      Starts UDMA operation of writing. * *   @b Arguments *   @verbatim        hAta         Handle to the ATA instance        loadVal      Value to be loaded into the register     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  Starts UDMA operation of writing. * *   @b Modifies *   @n ata BMIDTPP, UDMACTL, BMICP register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        Uint32             loadVal;        ...        CSL_ataP_UDMAStartWrite (hAta, loadVal);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataP_UDMAStartWrite (    CSL_AtaHandle              hAta,    Uint32                     loadVal){    if (loadVal != NULL) {        /* if "loadVal" is non-NULL, it specifies DMA Descriptor pointer */        CSL_FINS(hAta->regs->DMAENGINE.BMIDTPP, ATA_BMIDTPP_BMIDTP,                 (((Uint32) loadVal) >> 2));    }    /* configure for UDMA */    CSL_FINS(hAta->regs->CONFIG.UDMACTL, ATA_UDMACTL_UDMAP0, 1);    CSL_FINS(hAta->regs->CONFIG.UDMACTL, ATA_UDMACTL_UDMAP1, 1);    /* write to device */    CSL_FINS(hAta->regs->DMAENGINE.BMICP, ATA_BMICP_DMADIR, 0);    CSL_FINS(hAta->regs->DMAENGINE.BMICP, ATA_BMICP_DMASTART, 1);}/** ============================================================================ *   @n@b CSL_ataP_DMA_UDMA_Stop * *   @b Description *      Stop DMA & UDMA operations. * *   @b Arguments *   @verbatim        hAta         Handle to the ATA instance     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  DMA & UDMA operations stopped. * *   @b Modifies *   @n ata BMICP register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        ...        CSL_ataP_DMA_UDMA_Stop (hAta);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataP_DMA_UDMA_Stop (    CSL_AtaHandle             hAta){    CSL_FINS(hAta->regs->DMAENGINE.BMICP, ATA_BMICP_DMASTART, 0);}/** ============================================================================ *   @n@b CSL_ataP_IORDYTimeOutClear * *   @b Description *      Clear IORDY TimeOut pin. * *   @b Arguments *   @verbatim        hAta         Handle to the ATA instance     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  IORDY TimeOut pin cleared. * *   @b Modifies *   @n ata BMISP register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        ...        CSL_ataP_IORDYTimeOutClear (hAta);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataP_IORDYTimeOutClear (    CSL_AtaHandle                 hAta){    CSL_FINS(hAta->regs->DMAENGINE.BMISP, ATA_BMISP_IORDYINT, 1);}/** ============================================================================ *   @n@b CSL_ataP_IntrStatusClear * *   @b Description *      Clear Interrupt status pin. * *   @b Arguments *   @verbatim        hAta         Handle to the ATA instance     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  Interrupt status pin cleared. * *   @b Modifies *   @n ata BMISP register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        ...        CSL_ataP_IntrStatusClear (hAta);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataP_IntrStatusClear (    CSL_AtaHandle               hAta){    CSL_FINS(hAta->regs->DMAENGINE.BMISP, ATA_BMISP_INTRSTAT, 1);}/** ============================================================================ *   @n@b CSL_ataP_DMAErrorClear * *   @b Description *      Clear DMA Error pin. * *   @b Arguments *   @verbatim        hAta         Handle to the ATA instance     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  DMA Error pin cleared. * *   @b Modifies *   @n ata BMISP register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        ...        CSL_ataP_DMAErrorClear (hAta);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataP_DMAErrorClear (    CSL_AtaHandle             hAta){    CSL_FINS(hAta->regs->DMAENGINE.BMISP, ATA_BMISP_DMAERROR, 1);}/** ============================================================================ *   @n@b CSL_ataP_DMADescTable *

⌨️ 快捷键说明

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