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

📄 csl_ataaux.h

📁 TI达芬奇dm644x各硬件模块测试代码
💻 H
📖 第 1 页 / 共 5 页
字号:
 *   @b Description *      Load descriptor base address pointer. * *   @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  Descriptor base addr pointer is loaded. * *   @b Modifies *   @n ata BMIDTPS register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        Uint32             loadVal;        ...        CSL_ataS_DMADescTable (hAta, loadVal);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataS_DMADescTable (    CSL_AtaHandle            hAta,    Uint32                   loadVal){    CSL_FINS(hAta->regs->DMAENGINE.BMIDTPS, ATA_BMIDTPS_BMIDTP,             (((Uint32) loadVal) >> 2));}/** *  Functions Related to IODFTM registers control commands *//** ============================================================================ *   @n@b CSL_ataUdmaTmgMode * *   @b Description *      Sets the IODFTM Target UDMA mode. * *   @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  IODFTM Target UDMA mode is set. * *   @b Modifies *   @n ata TLGC register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        Uint8             loadVal;        ...        CSL_ataUdmaTmgMode (hAta, loadVal);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataUdmaTmgMode (    CSL_AtaHandle         hAta,    Uint8                 loadVal){    CSL_FINS(hAta->regs->IODFTM.TLGC, ATA_TLGC_UDMAMODE, loadVal);}/** ============================================================================ *   @n@b CSL_ataMisrOn * *   @b Description *      Sets the MISR ON. * *   @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  MISR is set on. The MISR state is also set. * *   @b Modifies *   @n ata TLGC register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        Uint8              loadVal;        ...        CSL_ataMisrOn (hAta, loadVal);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataMisrOn (    CSL_AtaHandle    hAta,    Uint8            loadVal){    CSL_FINS(hAta->regs->IODFTM.TLGC, ATA_TLGC_MC, loadVal);    CSL_FINS(hAta->regs->IODFTM.TLGC, ATA_TLGC_MT, 1);}/** ============================================================================ *   @n@b CSL_ataMisrOff * *   @b Description *      Sets the MISR OFF. * *   @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  MISR is set off. * *   @b Modifies *   @n ata TLGC register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        ...        CSL_ataMisrOff (hAta);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataMisrOff (    CSL_AtaHandle     hAta){    CSL_FINS(hAta->regs->IODFTM.TLGC, ATA_TLGC_MT, 0x03);}/** ============================================================================ *   @n@b CSL_ataIodftmBreakEnable * *   @b Description *      Enable the IODFTM Target device to generate pauses and stops *      during UDMA transfers * *   @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  IODFTM Target device is enabled to generate pauses & stops * *   @b Modifies *   @n ata TLGC register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        ...        CSL_ataIodftmBreakEnable (hAta);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataIodftmBreakEnable (    CSL_AtaHandle               hAta){    CSL_FINS(hAta->regs->IODFTM.TLGC, ATA_TLGC_ENBREAK, 1);}/** ============================================================================ *   @n@b CSL_ataIodftmEnable * *   @b Description *      Enable the IODFTM Target module to respond to the host. * *   @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  The I/O's are configured for the IODFTM Target module to respond *       to the host. * *   @b Modifies *   @n ata TLGC register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        ...        CSL_ataIodftmEnable (hAta);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataIodftmEnable (    CSL_AtaHandle          hAta){    CSL_FINS(hAta->regs->IODFTM.TLGC, ATA_TLGC_TARGEN, 1);}/** ============================================================================ *   @n@b CSL_ataExternalEnable * *   @b Description *      Enable the external target module to respond to the host. * *   @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  The I/O's are configured for the external target module to respond *       to the host. * *   @b Modifies *   @n ata TLGC register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        ...        CSL_ataExternalEnable (hAta);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataExternalEnable (    CSL_AtaHandle            hAta){    CSL_FINS(hAta->regs->IODFTM.TLGC, ATA_TLGC_TARGEN, 0);}/** ============================================================================ *   @n@b CSL_ataIodftmUdmaEnable * *   @b Description *      Enable the IODFTM Target module to support UDMA mode. * *   @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  The IODFTM Target state machine is configured to support UDMA transfers * *   @b Modifies *   @n ata TLGC register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        ...        CSL_ataIodftmUdmaEnable (hAta);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataIodftmUdmaEnable (    CSL_AtaHandle              hAta){    CSL_FINS(hAta->regs->IODFTM.TLGC, ATA_TLGC_UDMA, 1);}/** ============================================================================ *   @n@b CSL_ataIodftmPioEnable * *   @b Description *      Enable the IODFTM Target module to support PIO & Multiword transfers. * *   @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  The IODFTM Target state machine is configured to support PIO & *       Multiword transfers * *   @b Modifies *   @n ata TLGC register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        ...        CSL_ataIodftmPioEnable (hAta);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataIodftmPioEnable (    CSL_AtaHandle             hAta){    CSL_FINS(hAta->regs->IODFTM.TLGC, ATA_TLGC_UDMA, 0);}/** ============================================================================ *   @n@b CSL_ataMmsOutSel * *   @b Description *      Selects the core outputs for capture. * *   @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  Selects the core outputs for capture. * *   @b Modifies *   @n ata TLGC register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        ...        CSL_ataMmsOutSel (hAta);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataMmsOutSel (    CSL_AtaHandle       hAta){    CSL_FINS(hAta->regs->IODFTM.TLGC, ATA_TLGC_MMS, 0);}/** ============================================================================ *   @n@b CSL_ataMmsInSel * *   @b Description *      Selects the core inputs for capture. * *   @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  Selects the core inputs for capture. * *   @b Modifies *   @n ata TLGC register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        ...        CSL_ataMmsInSel (hAta);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataMmsInSel (    CSL_AtaHandle      hAta){    CSL_FINS(hAta->regs->IODFTM.TLGC, ATA_TLGC_MMS, 1);}/** ============================================================================ *   @n@b CSL_ataTestModeEnable * *   @b Description *      Selects test mode, where the functional output enables are gated off. * *   @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  The test mode is selected. * *   @b Modifies *   @n ata TLGC register. * *   @b Example *   @verbatim        CSL_AtaHandle      hAta;        ...        CSL_ataTestModeEnable (hAta);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_ataTestModeEnable (    CSL_AtaHandle            hAta){    CSL_FINS(hAta->regs->IODFTM.TLGC, ATA_TLGC_ESEL, 0);}/** ============================================================================ *   @n@b CSL_ataNormalModeEnable * *   @b Description *      Selects normal functional mode. * *   @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>

⌨️ 快捷键说明

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