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

📄 csl_ata.h

📁 TI达芬奇dm644x各硬件模块测试代码
💻 H
📖 第 1 页 / 共 4 页
字号:
);/** ============================================================================ *   @n@b CSL_ataHwSetupRaw * *   @b Description *   @n This function initializes the device registers with the register-values *      provided through the Config Data structure. * *   @b Arguments *   @verbatim            hAta            Handle to the ATA instance            config          Pointer to config structure     @endverbatim * *   <b> Return Value </b>  CSL_Status *   @li            CSL_SOK               - Configuration successful *   @li            CSL_ESYS_BADHANDLE    - Invalid handle *   @li            CSL_ESYS_INVPARAMS    - Configuration is not                                            properly initialized *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  The registers of the specified ATA instance will be setup *       according to input configuration structure values. * *   @b Modifies *   @n Hardware registers of the specified ATA instance. * *   @b Example *   @verbatim        CSL_AtaHandle       hAta;        CSL_AtaConfig       config = CSL_ATA_CONFIG_DEFAULTS;        CSL_Status          status;        status = CSL_ataHwSetupRaw (hAta, &config);     @endverbatim *  ============================================================================ */CSL_Status  CSL_ataHwSetupRaw (    CSL_AtaHandle                hAta,    CSL_AtaConfig               *config);/** ============================================================================ *   @n@b CSL_ataGetHwSetup * *   @b Description *   @n Gets the current setup of ATA. * *   @b Arguments *   @verbatim            hAta            Handle to the ATA instance            setup           Pointer to setup structure which contains the                            setup information of ATA.     @endverbatim * *   <b> Return Value </b>  CSL_Status *   @li                    CSL_SOK             - Setup info load successful. *   @li                    CSL_ESYS_BADHANDLE  - Invalid handle *   @li                    CSL_ESYS_INVPARAMS  - Invalid parameter * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  The registers of the specified ATA instance will be setup. * *   @b Modifies *   @n Hardware registers of the specified ATA instance. * *   @b Example *   @verbatim        CSL_AtaHandle       hAta;        CSL_AtaHwSetup      setup;        CSL_Status          status;        status = CSL_ataGetHwSetup (hAta, &setup);     @endverbatim *  ============================================================================ */CSL_Status  CSL_ataGetHwSetup (    CSL_AtaHandle                hAta,    CSL_AtaHwSetup              *hwSetup);/** ============================================================================ *   @n@b CSL_ataReadCommandRegs * *   @b Description *   @n It reads all the command registers. * *   @b Arguments *   @verbatim            hAta            Handle to the ATA            cmdRegs         Pointer to the CSL_AtaCommandBlockRead structure     @endverbatim * *   <b> Return Value </b>  CSL_AtaCommandBlockRead  cmdRegs * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  The cmdRegs structure is populated with the command registers values. * *   @b Modifies *   @n cmdRegs variable * *   @b Example *   @verbatim            CSL_AtaHandle            hAta;            CSL_AtaCommandBlockRead  cmdRegs;            ...            CSL_ataReadCommandRegs (hAta, &cmdRegs);            ...     @endverbatim *  ============================================================================ */CSL_AtaCommandBlockRead * CSL_ataReadCommandRegs (    CSL_AtaHandle                                   hAta,    CSL_AtaCommandBlockRead                        *cmdRegs);/** ============================================================================ *   @n@b CSL_ataWriteCommandRegs * *   @b Description *   @n It writes into all the command registers. * *   @b Arguments *   @verbatim            hAta            Handle to the ATA            cmdRegs         Pointer to the CSL_AtaCommandBlockWrite structure     @endverbatim * *   <b> Return Value </b>  CSL_AtaCommandBlockWrite  cmdRegs * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  The command registers is populated with values from the *       cmdRegs structure. * *   @b Modifies *   @n command registers * *   @b Example *   @verbatim            CSL_AtaHandle             hAta;            CSL_AtaCommandBlockWrite  cmdRegs;            ...            CSL_ataWriteCommandRegs (hAta, &cmdRegs);            ...     @endverbatim *  ============================================================================ */CSL_AtaCommandBlockWrite * CSL_ataWriteCommandRegs (    CSL_AtaHandle                                     hAta,    CSL_AtaCommandBlockWrite                         *cmdRegs);/** ============================================================================ *   @n@b CSL_ataWriteCommandReg * *   @b Description *   @n It writes into the command register. * *   @b Arguments *   @verbatim            hAta            Handle to the ATA            reg             CSL_AtaCmdRegWr            regVal          Uint16     @endverbatim * *   <b> Return Value </b>  Uint16  regVal * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  The command register is loaded with regVal. *   @n  The Status variable is modified. It can be either of the following: *           CSL_ESYS_BADHANDLE    - Invalid handle *           CSL_ESYS_INVPARAMS    - Invalid value for parameter reg *           CSL_SOK               - Command register write is successful * *   @b Modifies *   @n command register * *   @b Example *   @verbatim            CSL_AtaHandle             hAta;            CSL_AtaCmdRegWr           reg;            Uint16                    regVal;            ...            regVal = CSL_ataWriteCommandReg (hAta, reg, regVal);            ...     @endverbatim *  ============================================================================ */Uint16 CSL_ataWriteCommandReg (    CSL_AtaHandle               hAta,    CSL_AtaCmdRegWr             reg,    Uint16                      regVal);/** ============================================================================ *   @n@b CSL_ataReadCommandReg * *   @b Description *   @n It reads from the command register. * *   @b Arguments *   @verbatim            hAta            Handle to the ATA            reg             CSL_AtaCmdRegRd     @endverbatim * *   <b> Return Value </b>  Uint16  regVal * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  The command register is read. * *   @b Modifies *   @n None * *   @b Example *   @verbatim            CSL_AtaHandle             hAta;            CSL_AtaCmdRegRd           reg;            Uint16                    regVal;            ...            regVal = CSL_ataReadCommandReg (hAta, reg);            ...     @endverbatim *  ============================================================================ */Uint16 CSL_ataReadCommandReg (    CSL_AtaHandle              hAta,    CSL_AtaCmdRegRd            reg);/** ============================================================================ *   @n@b CSL_ataWriteControlReg * *   @b Description *   @n It writes into the control register. * *   @b Arguments *   @verbatim            hAta            Handle to the ATA            reg             CSL_AtaCtlRegWr            regVal          Uint16     @endverbatim * *   <b> Return Value </b>  Uint16  regVal * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  The control register is loaded with regVal. * *   @b Modifies *   @n control register * *   @b Example *   @verbatim            CSL_AtaHandle             hAta;            CSL_AtaCtlRegWr           reg;            Uint16                    regVal;            ...            regVal = CSL_ataWriteControlReg (hAta, reg, regVal);            ...     @endverbatim *  ============================================================================ */Uint16 CSL_ataWriteControlReg (    CSL_AtaHandle               hAta,    CSL_AtaCtlRegWr             reg,    Uint16                      regVal);/** ============================================================================ *   @n@b CSL_ataReadControlReg * *   @b Description *   @n It reads into the command register. * *   @b Arguments *   @verbatim            hAta            Handle to the ATA            reg             CSL_AtaCtlRegRd     @endverbatim * *   <b> Return Value </b>  Uint16  regVal * *   <b> Pre Condition </b> *   @n  None * *   <b> Post Condition </b> *   @n  The control register is read. * *   @b Modifies *   @n None * *   @b Example *   @verbatim            CSL_AtaHandle             hAta;            CSL_AtaCtlRegRd           reg;            ...            regVal = CSL_ataReadControlReg (hAta, reg);            ...     @endverbatim *  ============================================================================ */Uint16 CSL_ataReadControlReg (    CSL_AtaHandle              hAta,    CSL_AtaCtlRegRd            reg);#ifdef __cplusplus}#endif#endif /* _CSL_ATA_H_ */

⌨️ 快捷键说明

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