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

📄 csl_emif.h

📁 TI的DM6446的硬件平台搭建的相关例子
💻 H
📖 第 1 页 / 共 3 页
字号:
            hEmif            Handle to EMIF instance

            pEmifObj         Pointer to the EMIF instance object

            emifNum          Instance of the EMIF to be opened.

            pEmifParam       Pointer to module specific parameters

            pStatus         pointer for returning status of the function call

     @endverbatim
 *
 *   <b> Return Value </b>
 *      CSL_EmifHandle
 *        Valid EMIF instance handle will be returned if status value is
 *        equal to CSL_SOK.
 *
 *   <b> Pre Condition </b>
 *   @n  @a CSL_emifInit() must be called successfully.
 *
 *   <b> Post Condition </b>
 *   @n  None
 *
 *   @b  Modifies
 *   @n  None
 *
 *   @b Example:
 *   @verbatim
         CSL_status        status;
         CSL_EmifObj        emifObj;
         CSL_EmifHandle     hEmif;

         hI2c = CSL_EmifOpen (&emifObj,
                             CSL_EMIF,
                             NULL,
                             &status
                             );
     @endverbatim
 *
 * ===========================================================================
 */
CSL_EmifHandle CSL_emifOpen (
    /** Pointer to the object that holds reference to the
     *  instance of EMIF requested after the call
     */
    CSL_EmifObj                   *hEmifObj,
    /** Instance of EMIF to which a handle is requested  */
    CSL_InstNum                   emifNum,
    /** EMIF spcific parameter  */
    CSL_EmifParam                 *pEmifParam,
    /** This returns the status (success/errors) of the call */
    CSL_Status                    *status
);


/** ===========================================================================
 * @n@b   CSL_emifClose
 *
 * The Close call releases the resource and appropriate shared pins.
 *
 *   @b Arguments
 *   @verbatim
            hEmif         Handle to the EMIF instance
     @endverbatim
 *
 *   <b> Return Value   CSL_Status
 *   @li                    CSL_SOK            - EMIF is closed
 *                                               successfully
 *
 *   @li                    CSL_ESYS_BADHANDLE - The handle passed is invalid
 *
 *   <b> Pre Condition
 *   @n  None
 *
 *   <b> Post Condition
 *   @n  1. The EMIF CSL APIs can not be called until the EMIF
 *          CSL is reopened again using CSL_uartOpen()
 *
 *   @b Modifies
 *   @n  None
 *
 * <b> Usage Constraints: </b>
 * Both @a CSL_emifInit() and @a CSL_emifOpen() must be called successfully
 * in that order before @a CSL_emifClose() can be called.
 *
 * @b Example:
 * @verbatim


   CSL_EmifHandle hEmif;
   ...
   CSL_emifClose(hEmif);
   @endverbatim
 *
 *
 * ============================================================================
 */
CSL_Status  CSL_emifClose (
    /** Pointer to the object that holds reference to the
     *  instance of EMIF requested after the call
     */
    CSL_EmifHandle                hEmif
);


/** ============================================================================
 * @n@b   CSL_emifGetBaseAddress
 *
 * @b Description
 * @n The get base address call will give the External memory interface current
 *  current instance base address
 *
 *   @b Arguments
 *   @verbatim
            hEmif           Pointer to the peripheral data object of the
                            external memory interface instance

            emifNum         Specifies the instance of the external memory
                            interface for which the base address is requested

            pEmifParam      Module specific parameters.

            pBaseAddress    Pointer to the base address structure to return the
                            base address details.
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_OK            Open call is successful
 *   @li                    CSL_ESYS_FAIL     The external memory interface
 *                                            instance is not available.
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  Base address structure is populated
 *
 *   @b Modifies
 *   @n    1. The status variable
 *
 *         2. Base address structure.
 *
 *   @b Example
 *   @verbatim
        CSL_Status          status;
        CSL_EmifBaseAddress  baseAddress;

       ...
       status = CSL_emifGetBaseAddress(CSL_EMIF, NULL, &baseAddress);

    @endverbatim
 *
 * ============================================================================
 */
CSL_Status CSL_emifGetBaseAddress (
    CSL_InstNum               emifNum,
    CSL_EmifParam             *pEmifParam,
    CSL_EmifBaseAddress       *pBaseAddress
);


/** ============================================================================
 *   @n@b CSL_emifHwSetupRaw
 *
 *   @b Description
 *   @n This function initializes the device registers with the register-values
 *      provided through the config data structure.
 *
 *   @b Arguments
 *   @verbatim
            hEmif            Handle to the external memory interface instance

            config          Pointer to the config structure containing the
                            device register values
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK             - Configuration successful
 *   @li                    CSL_ESYS_BADHANDLE  - Invalid handle
 *   @li                    CSL_ESYS_INVPARAMS  - Configuration structure
 *                                                pointer is not properly
 *                                                initialized
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  The registers of the specified compact camera port instance will be
 *       setup according to the values passed through the config structure
 *
 *   @b Modifies
 *   @n Hardware registers of the specified compact camera port instance
 *
 *   @b Example
 *   @verbatim
        CSL_EmifHandle           hEmif;
        CSL_EmifConfig           config = CSL_EMIF_CONFIG_DEFAULTS;
        CSL_Status               status;

        ...

        status = CSL_emifHwSetupRaw (hEmif, &config);

        ...

     @endverbatim
 * ===========================================================================
 */
CSL_Status  CSL_emifHwSetupRaw (
    CSL_EmifHandle                 hEmif,
    CSL_EmifConfig                 *config
);


/** ============================================================================
 * @n@b   CSL_emifHwSetup
 *
 * @b Description
 * @n This function initializes the device registers with the appropriate values
 *  provided through the HwSetup Data structure. This function needs to be
 *  called only if the HwSetup Structure was not previously passed through the
 *  Open call. After the Setup is completed, the serial device is ready for
 *  data transfer. For information passed through the HwSetup Data structure
 *  refer @a CSL_EmifHwSetup.
 *   @b Arguments
 *
 *   @verbatim
            hEmif           Handle to the EMIFS instance

            setup           Pointer to hardware setup structure
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK             - Hardware setup successful
 *   @li                    CSL_ESYS_BADHANDLE  - Invalid handle
 *   @li                    CSL_ESYS_INVPARAMS  - Hardware structure is not
 *                                                properly initialized
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  The specified instance will be setup according to value passed
 *
 *   @b Modifies
 *   @n Hardware registers for the specified instance
 *
 *  <b> Usage Constraints: </b>
 *  Both @a CSL_emifInit() and @a CSL_emifOpen() must be called
 *  successfully in that order before this function can be called. The user
 *  has to allocate space for & fill in the main setup structure appropriately
 *  before calling this function
 *
 * @b Example:
 * @verbatim
     CSL_EmifHandle hEmif;
     CSL_EmifHwSetup hwSetup = CSL_EMIF_HWSETUP_DEFAULTS;
     CSL_emifHwSetup(hEmif, &hwSetup);
  @endverbatim
 *
 * ============================================================================
 */
CSL_Status  CSL_emifHwSetup (
    /** Pointer to the object that holds reference to the
     *  instance of EMIF requested after the call
     */
    CSL_EmifHandle                hEmif,
    /** Pointer to setup structure which contains the
     *  information to program EMIF to a useful state
     */
    CSL_EmifHwSetup               *setup
);


/** ============================================================================
 * @n@b   CSL_emifGetHwSetup
 *
 * @b Description
 * @nThis function gets the current setup of the EMIF. The status is
 *  returned through @a CSL_EmifHwSetup. The obtaining of status
 *  is the reverse operation of @a CSL_emifHwSetup() function.
 *
 *  @b Arguments
 *
 *   @verbatim
            hEmif           Handle to the EMIFS instance

            setup           Pointer to hardware setup structure
     @endverbatim
 *
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK             - Hardware setup successful
 *   @li                    CSL_ESYS_BADHANDLE  - Invalid handle
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  The hardware set up structure will be populated with values from
 *       the registers
 *
 *   @b Modifies
 *   @n None
 *
 *  <b> Usage Constraints: </b>
 *  Both @a CSL_emifInit() and @a CSL_emifOpen() must be called successfully
 *  in that order before @a CSL_emifGetHwSetup() can be called.
 *
 * @b Example:
 * @verbatim
      CSL_EmifHandle hEmif;
      CSL_Status status;
      CSL_EmifHwSetup *mysetup;
       ...
      status = CSL_emifGetHwSetup(hEmif, &mysetup);
   @endverbatim
 *
 *
 * ============================================================================
 */
CSL_Status  CSL_emifGetHwSetup (
    /** Pointer to the object that holds reference to the
     *  instance of EMIF requested after the call
     */
    CSL_EmifHandle                hEmif,
    /** Pointer to setup structure which contains the
     *  information to program EMIF to a useful state
     */
    CSL_EmifHwSetup               *setup
);


/** ============================================================================
 * @n@b   CSL_emifHwControl
 *
 * @b Description
 * @n Control operations for the EMIF.  For a particular control operation, the
 *  pointer to the corresponding data type needs to be passed as argument
 *  HwControl function Call. All the arguments (Structure elements included)
 *  passed to  the HwControl function are inputs. For the list of commands
 *  supported and argument type that can be @a void* casted & passed with a
 *  particular command refer to @a CSL_EmifHwControlCmd.
 *
 *
 *   @b Arguments
 *   @verbatim
            hEmif         Handle to the EMIF instance

            cmd          Operation to be performed on the EMIF

            arg          Argument specific to the command

     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK            - Command execution successful.
 *   @li                    CSL_ESYS_BADHANDLE - Invalid handle
 *   @li                    CSL_ESYS_INVCMD    - Invalid command
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  Registers of the EMIF instance are configured according to the command
 *       and the command arguments. The command determines which registers are
 *       modified.
 *
 *   @b Modifies
 *   @n Registers determined by the command
 *
 *  <b> Usage Constraints: </b>
 *  Both @a CSL_emifInit() and @a CSL_emifOpen() must be called successfully
 *  in that order before @a CSL_emifHwControl() can be called. For the
 *  argument type that can be @a void* casted & passed with a particular command
 *  refer to @a CSL_EmifHwControlCmd
 *
 * @b Example:
 * @verbatim
       CSL_EmifHandle hEmif;
       CSL_Status status;
       ...
       status = CSL_emifHwControl(hEmif,
                                    CSL_EMIF_CMD_START,
                                   &command);
   @endverbatim
 *
 *
 * ============================================================================
 */
CSL_Status  CSL_emifHwControl (
    /** Pointer to the object that holds reference to the
     *  instance of EMIF requested after the call
     */
    CSL_EmifHandle                hEmif,
    /** The command to this API indicates the action to be taken */
    CSL_EmifHwControlCmd          cmd,
    /** An optional argument @a void* casted */
    void                          *arg
);


/** ============================================================================
 * @n@b   CSL_emifGetHwStatus
 *
 * @b Description
 * @n This function is used to read the current device configuration, status flags
 *  and the value present associated registers. Following table details the
 *  various status queries supported and the associated data structure to record
 *  the response. User should allocate memory for the said data type and pass
 *  its pointer as an unadorned void* argument to the status query call. For
 *  details about the various status queries supported and the associated data
 *  structure to record the response, refer to @a CSL_EmifHwStatusQuery
 *
 *   @b Arguments
 *   @verbatim
            hEmif           Handle to the EMIF instance

            query           Query to be performed

            response        Pointer to buffer to return the data requested by
                            the query passed
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK            - Successful completion of the
 *                                               query
 *
 *   @li                    CSL_ESYS_BADHANDLE - Invalid handle
 *
 *   @li                    CSL_ESYS_INVQUERY  - Query command not supported
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *       Data requested by the query is returned through the variable "response"
 *
 *   @b Modifies
 *   @n  The input arguement "response" is modified
 *
 *  <b> Usage Constraints: </b>
 *  Both @a CSL_emifInit() and @a CSL_emifOpen() must be called successfully
 *  in that order before @a CSL_emifGetHwStatus() can be called. For the
 *  argument type that can be @a void* casted & passed with a particular command
 *  refer to @a CSL_EmifHwStatusQuery
 *
 * @b Example:
 * @verbatim
      CSL_EmifHandle hEmif;
      CSL_Status status;
      Uint16  *response;
       ...
      status = CSL_emifGetHwStatus(hEmif,
                           CSL_EMIF_QUERY_BUS_BUSY,
                                  &response);
   @endverbatim
 *
 *
 * ============================================================================
 */
CSL_Status  CSL_emifGetHwStatus (

    /** Pointer to the object that holds reference to the
     *  instance of EMIF requested after the call
     */
    CSL_EmifHandle                hEmif,
    /** The query to this API which indicates the status
     *  to be returned
     */
    CSL_EmifHwStatusQuery         query,
    /** Placeholder to return the status. @a void* casted */
    void                          *response
);


#ifdef __cplusplus
}
#endif


#endif

⌨️ 快捷键说明

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