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

📄 csl_intc.h

📁 TI达芬奇dm644x各硬件模块测试代码
💻 H
📖 第 1 页 / 共 2 页
字号:
         status = CSL_intcHwSetup (hIntc, &setup);    @endverbatim * ============================================================================= */CSL_Status CSL_intcHwSetup (    CSL_IntcHandle            hIntc,    CSL_IntcHwSetup          *hwSetup);/** ============================================================================ *  @n@b CSL_intcHwControl * *  @b Description *  @n Perform a control-operation. This API is used to invoke any of the *     supported control-operations supported by the module. * *  @b Arguments *  @verbatim             hIntc           Handle identifying the event             command         The command to this API indicates the action to be                             taken on INTC.             commandArg      An optional argument.    @endverbatim * *  <b> Return Value </b>  CSL_Status *  @li                    CSL_SOK             - HwControl successful. *  @li                    CSL_ESYS_BADHANDLE  - Invalid handle *  @li                    CSL_ESYS_INVCMD     - Invalid command *  @li                    CSL_ESYS_INVPARAMS  - Invalid parameter *  @li                    CSL_ESYS_FAIL       - HwControl failed * *  <b> Pre Condition </b> *  @n  None * *  <b> Post Condition </b> *  @n  None * *  @b Modifies *  @n The hardware registers of INTC. * *  @b Example *  @verbatim        CSL_IntcHandle         hIntc;        CSL_IntcHwControlCmd   cmd;        void                   arg;        status = CSL_intcHwControl (hIntc, cmd, &arg);    @endverbatim * ============================================================================= */CSL_Status CSL_intcHwControl (    CSL_IntcHandle              hIntc,    CSL_IntcHwControlCmd        command,    void                       *commandArg);/** ============================================================================ *  @n@b CSL_intcGetHwStatus * *  @b Description *  @n Queries the peripheral for status. The CSL_intcGetHwStatus() API *     could be used to retrieve status or configuration information from *     the peripheral. The user must allocate an object that would hold *     the retrieved information and pass a pointer to it to the function. *     The type of the object is specific to the query-command. * *  @b Arguments *  @verbatim           hIntc           Handle identifying the event           query           The query to this API of INTC which indicates the                           status to be returned.           response        Placeholder to return the status.    @endverbatim * *  <b> Return Value </b> CSL_Status *  @li                   CSL_SOK               - Status info return successful *  @li                   CSL_ESYS_BADHANDLE    - Invalid handle *  @li                   CSL_ESYS_INVQUERY     - Invalid query *  @li                   CSL_ESYS_NOTSUPPORTED - Action not supported * *  <b> Pre Condition </b> *  @n  None * *  <b> Post Condition </b> *  @n  None * *  @b Modifies *  @n None * *  @b Example: *  @verbatim         Bool    evtPending = FALSE;         while (evtPending == FALSE) {              CSL_intcGetHwStatus(hIntc, CSL_INTC_QUERY_ISEVENTPENDING,                                  &evtPending);         }    @endverbatim * ============================================================================= */CSL_Status CSL_intcGetHwStatus (    CSL_IntcHandle                hIntc,    CSL_IntcHwStatusQuery         query,    void                         *response);/** ============================================================================ *  @n@b CSL_intcEventEnable * *  @b Description *  @n Enable an event. The API enables the specified event. If the user wishes *     to restore the enable-state of the event at a later point of time, they *     may store the current state using the parameter, which could be used *     with CSL_intcEventRestore(). *     Note: The function directly works on the event and hence it is *     not necessary to "open" the event to invoke the API. * *  @b Arguments *  @verbatim        eventId     Event-ID of interest        prevState   (Optional) Pointer to object that would store current state    @endverbatim * *  <b> Return Value </b> CSL_Status *  @li                   CSL_SOK on success * *  @b Example: *  @verbatim        CSL_intcEventEnable(CSL_INTC_EVENTID_UART1, NULL);    @endverbatim * ============================================================================= */CSL_Status CSL_intcEventEnable (    CSL_IntcEventId               eventId,    CSL_IntcEventEnableState     *prevState);/** ============================================================================ *  @n@b CSL_intcEventDisable * *  @b Description *  @n Disable an event. The API disables the specified event.If the user wishes *     to restore the enable-state of the event at a later point of time, they *     may store the current state using the parameter, which could be used *     with CSL_intcEventRestore(). *     Note: The function directly works on the event and hence it is *     not necessary to "open" the event to invoke the API. * *  @b Arguments *  @verbatim        eventId     Event-ID of interest        prevState   (Optional) Pointer to object that would store current state    @endverbatim * *  <b> Return Value </b> CSL_Status *  @li                   CSL_SOK on success * *  @b Example: *  @verbatim        CSL_IntcEventEnableState    oldState;        CSL_intcEventDisable (CSL_INTC_EVENTID_I2C, &oldState);    @endverbatim * ============================================================================= */CSL_Status CSL_intcEventDisable (    CSL_IntcEventId                eventId,    CSL_IntcEventEnableState      *prevState);/** ============================================================================ *  @n@b CSL_intcEventRestore * *  @b Description *  @n Restore the event to a previous enabled/disabled state. *     The API restores the specified event to a previous enable-state *     as recorded by the event-enable state passed as an argument. *     Note: The function directly works on the event and hence it is *     not necessary to "open" the event to invoke the API. * *  @b Arguments *  @verbatim        eventId     Event-ID of interest        prevState   Object that contains information about previous state    @endverbatim * *  <b> Return Value </b> CSL_Status *  @li                   CSL_SOK on success * *  @b Example: *  @verbatim        CSL_intcEventRestore(CSL_INTC_EVENTID_I2C, oldState);    @endverbatim * ============================================================================= */CSL_Status CSL_intcEventRestore (    CSL_IntcEventId               eventId,    CSL_IntcEventEnableState      prevState);/** ============================================================================ *  @n@b CSL_intcGlobalEnable * *  @b Description *  @n Globally enable interrupts. *     The API enables the global interrupt by manipulating the processor's *     global interrupt enable/disable flag. If the user wishes to restore *     the enable-state at a later point, they may store the current state *     using the parameter, which could be used with CSL_intcGlobalRestore(). *     CSL_intcGlobalEnable() must be called from a privileged mode. * *  @b Arguments *  @verbatim        prevState   (Optional) Pointer to object that would store current state    @endverbatim * *  <b> Return Value </b> CSL_Status *  @li                   CSL_SOK on success * *  @b Example: *  @verbatim        CSL_intcGlobalEnable(NULL);    @endverbatim * ============================================================================= */CSL_Status CSL_intcGlobalEnable (    CSL_IntcGlobalEnableState     *prevState);/** ============================================================================ *  @n@b CSL_intcGlobalDisable * *  @b Description *  @n Globally disable interrupts. *     The API disables the global interrupt by manipulating the processor's *     global interrupt enable/disable flag. If the user wishes to restore *     the enable-state at a later point, they may store the current state *     using the parameter, which could be used with CSL_intcGlobalRestore(). *     CSL_intcGlobalDisable() must be called from a privileged mode. * *  @b Arguments *  @verbatim        prevState   (Optional) Pointer to object that would store current state    @endverbatim * *  <b> Return Value </b> CSL_Status *  @li                   CSL_SOK on success * *  @b Example: *  @verbatim        CSL_IntcGlobalEnableState   gieState;        CSL_intcGlobalDisable(&gieState);        // critical-section code //        CSL_intcGlobalRestore(gieState);    @endverbatim * ============================================================================= */CSL_Status CSL_intcGlobalDisable (    CSL_IntcGlobalEnableState      *prevState);/** ============================================================================ *  @n@b CSL_intcGlobalRestore * *  @b Description *  @n Restore global interrupt enable/disable to a previous state. *     The API restores the global interrupt enable/disable state to a previous *     state as recorded by the global-event-enable state passed as an argument. *     CSL_intcGlobalRestore() must be called from a privileged mode. * *  @b Arguments *  @verbatim        prevState   Object containing information about previous state    @endverbatim * *  <b> Return Value </b> CSL_Status *  @li                   CSL_SOK on success * *  @b Example: *  @verbatim        CSL_IntcGlobalEnableState   gieState;        CSL_intcGlobalDisable(&gieState);        // critical-section code //        CSL_intcGlobalRestore(gieState);    @endverbatim * ============================================================================= */CSL_Status CSL_intcGlobalRestore (    CSL_IntcGlobalEnableState      prevState);/** ============================================================================ *  @n@b CSL_intcDispatcherInit * *  @b Description *  @n Hooks up and sets up the CSL interrupt dispatchers. *     The user should call CSL_intcDispatcherInit() if they *     wish to make use of the dispatchers built into the CSL INTC *     module. This API must be called before using CSL_intcPlugEventHandler() * *  @b Arguments *  @n None * *  <b> Return Value </b> CSL_Status *  @li                   CSL_SOK on success *  @li                   CSL_ESYS_FAIL on failure. * *  @b Example: *  @verbatim        CSL_sysInit( );        if (CSL_intcInit( ) != CSL_SOK) {          // module initialization failed! //        }        if (CSL_intcDispatcherInit( ) != CSL_SOK) {          // CSL dispatcher setting up failed! //        }    @endverbatim * ============================================================================= */CSL_Status CSL_intcDispatcherInit (    void);/** ============================================================================ *  @n@b CSL_intcPlugEventHandler * *  @b Description *  @n Associate an event-handler with an event *     CSL_intcPlugEventHandler() ties an event-handler to an event; so *     that the occurence of the event, would result in the event-handler *     being invoked. * *  @b Arguments *  @verbatim        hIntc                Handle identying the interrupt-event        eventHandlerRecord   Provides the details of the event-handler    @endverbatim * *  <b> Return Value </b> *  @n  Returns the address of the previous handler * *  @b Example: *  @verbatim        CSL_IntcEventHandlerRecord  evtHandlerRecord;        evtHandlerRecord.handler = myIsr;        evtHandlerRecord.arg     = (void *)hTimer;        CSL_intcPlugEventHandler(hIntc, &evtHandlerRecord);    @endverbatim * ============================================================================= */CSL_IntcEventHandler CSL_intcPlugEventHandler (    CSL_IntcHandle               hIntc,    CSL_IntcEventHandlerRecord  *eventHandlerRecord);/** ============================================================================ *  @n@b CSL_intcHookIsr * *  @b Description *  @n Hook up an exception handler *     This API hooks up the handler to the specified exception. *     Note: In this case, it is done by inserting a B(ranch) instruction *     to the handler. Because of the restriction in the instruction *     the handler must be within 32MB of the exception vector. *     Also, the function assumes that the exception vector table is *     located at its default ("low") address. * *  @b Arguments *  @verbatim        vectId       Exception identifier        isrAddr      Pointer to the handler    @endverbatim * *  @b Example: *  @verbatim        CSL_intcHookIsr(CSL_INTC_VECTID_UNDEF, (void *)myUndefExceptionHandler);    @endverbatim * ============================================================================= */void CSL_intcHookIsr (    CSL_IntcVectId      vectId,    void               *isrAddr);#ifdef __cplusplus}#endif#endif

⌨️ 快捷键说明

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