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

📄 ixtimesyncacc.h

📁 Uboot源码,非常通用的bootloader.适用于各种平台的Linux系统引导.
💻 H
📖 第 1 页 / 共 2 页
字号:
 * * @param tickRate [in] - Value to set Tick Rate *                         * This API will set the Tick Rate (Frequency Scaling Value) in the IEEE * 1588 block to the given value. The Accumulator register (not client  * visible) is incremented by this TickRate value every clock cycle. When  * the Accumulator overflows, the SystemTime is incremented by one. This * TickValue can therefore be used to adjust the system timer. *            * @li Re-entrant   : yes * @li ISR Callable : no * * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful *         @li IX_TIMESYNCACC_FAILED - Internal error occurred */PUBLIC IxTimeSyncAccStatusixTimeSyncAccTickRateSet(UINT32 tickRate);/** * @ingroup IxTimeSyncAcc *  * @fn IxTimeSyncAccStatus ixTimeSyncAccTickRateGet(                               UINT32 *tickRate) * * @brief Gets the Tick Rate (Frequency Scaling Value) from the IEEE 1588 * hardware assist block * * @param tickRate [out] - Current Tick Rate value in the IEEE 1588 block * * This API will get the TickRate on IEE15588 block. Refer to @ref  * ixTimeSyncAccTickRateSet for notes on usage of this value. *          * @li   Reentrant    : yes * @li   ISR Callable : no * * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful *         @li IX_TIMESYNCACC_INVALIDPARAM - Invalid parameters passed *         @li IX_TIMESYNCACC_FAILED - Internal error occurred */PUBLIC IxTimeSyncAccStatusixTimeSyncAccTickRateGet(UINT32 *tickRate);/** * @ingroup IxTimeSyncAcc *  * @fn IxTimeSyncAccStatus ixTimeSyncAccTargetTimeInterruptEnable(                               IxTimeSyncAccTargetTimeCallback targetTimeCallback) * * @brief Enables the interrupt to verify the condition where the System Time  * greater or equal to the Target Time in the IEEE 1588 hardware assist block.  * If the condition is true an interrupt will be sent to XScale. * * @param targetTimeCallback [in] - Callback to be invoked when interrupt fires * * This API will enable the Target Time reached/hit condition interrupt. * * NOTE: The client application needs to ensure that the APIs  * @ref ixTimeSyncAccTargetTimeInterruptEnable, @ref ixTimeSyncAccTargetTimeSet and * @ref ixTimeSyncAccTargetTimeInterruptDisable are accessed in mutual exclusive  * manner with respect to each other. * * @li Re-entrant   : no * @li ISR Callable : yes * * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful *         @li IX_TIMESYNCACC_INVALIDPARAM - Null parameter passed for callback *         @li IX_TIMESYNCACC_FAILED - Internal error occurred */PUBLIC IxTimeSyncAccStatusixTimeSyncAccTargetTimeInterruptEnable(IxTimeSyncAccTargetTimeCallback targetTimeCallback);/** * @ingroup IxTimeSyncAcc *  * @fn IxTimeSyncAccStatus ixTimeSyncAccTargetTimeInterruptDisable(                               void) * * @brief Disables the interrupt for the condition explained in the function * description of @ref ixTimeSyncAccTargetTimeInterruptEnable. * * This API will disable the Target Time interrupt. * * NOTE: The client application needs to ensure that the APIs  * @ref ixTimeSyncAccTargetTimeInterruptEnable, @ref ixTimeSyncAccTargetTimeSet and * @ref ixTimeSyncAccTargetTimeInterruptDisable are accessed in mutual exclusive  * manner with respect to each other. *               * @li Re-entrant   : no * @li ISR Callable : yes * * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful *         @li IX_TIMESYNCACC_FAILED - Internal error occurred */PUBLIC IxTimeSyncAccStatusixTimeSyncAccTargetTimeInterruptDisable(void);/** * @ingroup IxTimeSyncAcc *  * @fn IxTimeSyncAccStatus ixTimeSyncAccTargetTimePoll(                               BOOL *ttmPollFlag,                               IxTimeSyncAccTimeValue *targetTime) * * @brief Poll to verify the condition where the System Time greater or equal to * the Target Time in the IEEE 1588 hardware assist block. If the condition is * true an event flag is set in the hardware. * * @param ttmPollFlag [out] - TRUE  if the target time reached/hit condition event set *                            FALSE if the target time reached/hit condition event is                                     not set * @param targetTime [out] - Capture current targetTime into client provided buffer * * Poll the target time reached/hit condition status. Return true and the current * target time value, if the condition is true else return false. * * NOTE: The client application will need to clear the event flag that will be set * as long as the condition that the System Time greater or equal to the Target Time is * valid, in one of the following ways: *     1) Invoke the API to change the target time *     2) Change the system timer value  *               * @li Re-entrant   : yes * @li ISR Callable : no * * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful *         @li IX_TIMESYNCACC_INVALIDPARAM - Null parameter passed *         @li IX_TIMESYNCACC_FAILED - Internal error occurred *         @li IX_TIMESYNCACC_INTERRUPTMODEINUSE - Interrupt mode in use */PUBLIC IxTimeSyncAccStatusixTimeSyncAccTargetTimePoll(BOOL *ttmPollFlag,    IxTimeSyncAccTimeValue *targetTime);/** * @ingroup IxTimeSyncAcc *  * @fn IxTimeSyncAccStatus ixTimeSyncAccTargetTimeSet(                               IxTimeSyncAccTimeValue targetTime) * * @brief Sets the Target Time in the IEEE 1588 hardware assist block * * @param targetTime [in] - Value to set Target Time *                         * This API will set the Target Time to a given value. * * NOTE: The client application needs to ensure that the APIs  * @ref ixTimeSyncAccTargetTimeInterruptEnable, @ref ixTimeSyncAccTargetTimeSet and * @ref ixTimeSyncAccTargetTimeInterruptDisable are accessed in mutual exclusive  * manner with respect to each other. *               * @li   Reentrant    : no * @li   ISR Callable : yes * * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful *         @li IX_TIMESYNCACC_FAILED - Internal error occurred */PUBLIC IxTimeSyncAccStatusixTimeSyncAccTargetTimeSet(IxTimeSyncAccTimeValue targetTime);/** * @ingroup IxTimeSyncAcc *  * @fn IxTimeSyncAccStatus ixTimeSyncAccTargetTimeGet(                               IxTimeSyncAccTimeValue *targetTime) * * @brief Gets the Target Time in the IEEE 1588 hardware assist block * * @param targetTime [out] - Copy current time to client provided buffer *                                                  * This API will get the Target Time from IEEE 1588 block and return to the  * client application *             * @li Re-entrant   : yes * @li ISR Callable : no * * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful *         @li IX_TIMESYNCACC_INVALIDPARAM - Null parameter passed *         @li IX_TIMESYNCACC_FAILED - Internal error occurred */PUBLIC IxTimeSyncAccStatusixTimeSyncAccTargetTimeGet(IxTimeSyncAccTimeValue *targetTime);/** * @ingroup IxTimeSyncAcc *  * @fn IxTimeSyncAccStatus ixTimeSyncAccAuxTimeInterruptEnable(                               IxTimeSyncAccAuxMode auxMode,                                IxTimeSyncAccAuxTimeCallback auxTimeCallback) * * @brief Enables the interrupt notification for the given mode of Auxiliary Time  * Stamp in the IEEE 1588 hardware assist block *  * @param auxMode [in] - Auxiliary time stamp register (slave or master) to use * @param auxTimeCallback [in] - Callback to be invoked when interrupt fires  *                                                               * This API will enable the Auxiliary Master/Slave Time stamp Interrupt. * * <pre> * NOTE: 1) An individual callback is to be registered for each Slave and Master  * Auxiliary Time Stamp registers. Thus to register for both Master and Slave time * stamp interrupts either the same callback or two separate callbacks the API has * to be invoked twice. *       2) On the IXDP465 Development Platform, the Auxiliary Timestamp signal for  * slave mode is tied to GPIO 8 pin. This signal is software routed by default to  * PCI for backwards compatibility with the IXDP425 Development Platform. This * routing must be disabled for the auxiliary slave time stamp register to work  * properly. The following commands may be used to accomplish this. However, refer * to the IXDP465 Development Platform Users Guide or the BSP/LSP documentation for * more specific information. * * For Linux (at the Redboot prompt i.e., before loading zImage): *     mfill -b 0x54100000 -1 -l 1 -p 8 *     mfill -b 0x54100001 -1 -l 1 -p 0x7f * For vxWorks, at the prompt: *     intDisable(25) *     ixdp400FpgaIODetach(8) * </pre> *               * @li Re-entrant   : no * @li ISR Callable : no * * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful *         @li IX_TIMESYNCACC_INVALIDPARAM - Null parameter passed for callback or                                            invalid auxiliary snapshot mode *         @li IX_TIMESYNCACC_FAILED - Internal error occurred */PUBLIC IxTimeSyncAccStatusixTimeSyncAccAuxTimeInterruptEnable(IxTimeSyncAccAuxMode auxMode,    IxTimeSyncAccAuxTimeCallback auxTimeCallback);/** * @ingroup IxTimeSyncAcc *  * @fn IxTimeSyncAccStatus ixTimeSyncAccAuxTimeInterruptDisable(                               IxTimeSyncAccAuxMode auxMode) * * @brief Disables the interrupt for the indicated mode of Auxiliary Time Stamp * in the IEEE 1588 hardware assist block * * @param auxMode [in] - Auxiliary time stamp mode (slave or master) using which * the interrupt will be disabled. *                         * This API will disable the Auxiliary Time Stamp Interrupt (Master or Slave) *               * @li Re-entrant   : yes * @li ISR Callable : no * * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful *         @li IX_TIMESYNCACC_INVALIDPARAM - Invalid parameters passed *         @li IX_TIMESYNCACC_FAILED - Internal error occurred */PUBLIC IxTimeSyncAccStatusixTimeSyncAccAuxTimeInterruptDisable(IxTimeSyncAccAuxMode auxMode);/** * @ingroup IxTimeSyncAcc *  * @fn IxTimeSyncAccStatus ixTimeSyncAccAuxTimePoll(                               IxTimeSyncAccAuxMode auxMode,                               BOOL *auxPollFlag,                               IxTimeSyncAccTimeValue *auxTime) * * @brief Poll for the Auxiliary Time Stamp captured for the mode indicated  * (Master or Slave) * * @param auxMode [in] - Auxiliary Snapshot Register (Slave or Master) to be checked * @param auxPollFlag [out] - TRUE if the time stamp captured in auxiliary                                    snapshot register *                            FALSE if the time stamp not captured in                                    auxiliary snapshot register * @param auxTime [out] - Copy the current Auxiliary Snapshot Register value into the * client provided buffer * * Polls for the Time stamp in the appropriate Auxiliary Snapshot Registers based  * on the mode specified. Return true and the contents of the Auxiliary snapshot, * if it is available else return false. *  * Please refer to the note #2 of the API @ref ixTimeSyncAccAuxTimeInterruptEnable * for more information for Auxiliary Slave mode. * * @li Re-entrant   : yes * @li ISR Callable : no * * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful *         @li IX_TIMESYNCACC_INVALIDPARAM - Null parameter passed for auxPollFlag,                   callback or invalid auxiliary snapshot mode *         @li IX_TIMESYNCACC_FAILED - Internal error occurred *         @li IX_TIMESYNCACC_INTERRUPTMODEINUSE - Interrupt mode in use */PUBLIC IxTimeSyncAccStatusixTimeSyncAccAuxTimePoll(IxTimeSyncAccAuxMode auxMode,    BOOL *auxPollFlag,    IxTimeSyncAccTimeValue *auxTime);/** * @ingroup IxTimeSyncAcc * * @fn IxTimeSyncAccStatus ixTimeSyncAccReset(void) * * @brief Resets the IEEE 1588 hardware assist block * * Sets the reset bit in the IEEE1588 silicon which fully resets the silicon block *             * @li Reentrant    : yes * @li ISR Callable : no * * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful *         @li IX_TIMESYNCACC_FAILED  - Internal error occurred */PUBLIC IxTimeSyncAccStatusixTimeSyncAccReset(void);/** * @ingroup IxTimeSyncAcc * * @fn IxTimeSyncAccStatus ixTimeSyncAccStatsGet(IxTimeSyncAccStats                               *timeSyncStats) * * @brief Returns the IxTimeSyncAcc Statistics in the client supplied buffer * * @param timeSyncStats [out] - TimeSync statistics counter values * * This API will return the statistics of the received or transmitted messages. *  * NOTE: 1) These counters are updated only when the client polls for the time  * stamps or interrupt are enabled. This is because the IxTimeSyncAcc module  * does not either transmit or receive messages and does only run the code  * when explicit requests received by client application. * *       2) These statistics reflect the number of valid PTP messages exchanged * in Master and Slave modes but includes all the messages (including valid  * non-PTP messages) while operating in the Any mode. *               * @li Reentrant    : no * @li ISR Callable : no * * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful *         @li IX_TIMESYNCACC_INVALIDPARAM - NULL parameter passed *         @li IX_TIMESYNCACC_FAILED - Internal error occurred */PUBLIC IxTimeSyncAccStatusixTimeSyncAccStatsGet(IxTimeSyncAccStats *timeSyncStats);/** * @ingroup IxTimeSyncAcc * * @fn void ixTimeSyncAccStatsReset(void) * * @brief Reset Time Sync statistics * * This API will reset the statistics counters of the TimeSync access layer. *              * @li Reentrant    : yes * @li ISR Callable:  no * * @return @li None */PUBLIC voidixTimeSyncAccStatsReset(void);/** * @ingroup IxTimeSyncAcc * * @fn IxTimeSyncAccStatus ixTimeSyncAccShow(void) * * @brief Displays the Time Sync current status * * This API will display status on the current configuration of the IEEE * 1588 hardware assist block, contents of the various time stamp registers, * outstanding interrupts and/or events. * * Note that this is intended for debug only, and in contrast to the other * functions, it does not clear the any of the status bits associated with * active timestamps and so is passive in its nature. *             * @li Reentrant    : yes * @li ISR Callable : no * * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful *         @li IX_TIMESYNCACC_FAILED - Internal error occurred */PUBLIC IxTimeSyncAccStatusixTimeSyncAccShow(void);#endif /* __ixp46X */#endif /* IXTIMESYNCACC_H *//** * @} defgroup IxTimeSyncAcc */

⌨️ 快捷键说明

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