forked from gatsby/df_datalink
Common Update: Better Doxygen Style
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
* Description: A simplified version of timesync for datalink 814 (Dijian)
|
||||
*
|
||||
* Date: 2023-12-20-04 16:32
|
||||
* LastEditors: Fan Hao
|
||||
* LastEditTime: 2023-12-20 16:32
|
||||
* Revisions: Rev 0.0
|
||||
* History:
|
||||
* [2023-12-20]: Initial version.
|
||||
*
|
||||
* Copyright(c) 2021 Beijing Institute of Technology.
|
||||
* Lab of Communication and Networking
|
||||
* @file time_ctrl.h
|
||||
* @author FanHao ([email protected])
|
||||
* @brief Time sync controller driver header file.
|
||||
* @version 0.0
|
||||
* @date 2023-12-20
|
||||
* @copyright Copyright(c) 2024 Beijing Institute of Technology.\n
|
||||
* Lab of Communication and Network
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/**
|
||||
* @defgroup TimeController_Driver
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef TIME_CTRL_H_
|
||||
#define TIME_CTRL_H_
|
||||
|
||||
@@ -23,30 +24,43 @@
|
||||
#define TIME_FRAC_MAX 500000 // how many 10ns in a 5ms
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
/**************************** Type Definitions *******************************/
|
||||
/**
|
||||
* @enum TIMECTRL_ADJ_TYPE
|
||||
* @brief defines the time adjustment methods
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
TM_ADJ_NONE = 0,
|
||||
TM_ADJ_ADD = 1,
|
||||
TM_ADJ_SET = 2
|
||||
TM_ADJ_NONE = 0, ///< none
|
||||
TM_ADJ_ADD = 1, ///< adjust time by add
|
||||
TM_ADJ_SET = 2 ///< adjust time by set
|
||||
} TIMECTRL_ADJ_TYPE;
|
||||
|
||||
typedef uint32_t TIME_FRAC;
|
||||
typedef uint32_t TIME_INT;
|
||||
|
||||
/**
|
||||
* @struct TimeWord
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* 5ms each LSB */
|
||||
TIME_INT int_part;
|
||||
/* 10ns each LSB */
|
||||
TIME_FRAC frac_part;
|
||||
TIME_INT int_part; ///< 5ms each LSB
|
||||
TIME_FRAC frac_part; ///< 10ns each LSB
|
||||
} TIME_WORD;
|
||||
|
||||
/**
|
||||
* @struct TmcConfig.
|
||||
* @brief TmcConfig holds the initialization parameters of time controller
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uintptr_t baseAddr;
|
||||
uint32_t reset; // time for reset (unit: us)
|
||||
} TMC_CONFIG;
|
||||
|
||||
/**
|
||||
* @struct TmcInst.
|
||||
* @brief An instance struct of time controller
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
TMC_CONFIG config;
|
||||
@@ -72,3 +86,5 @@ void TimeCtrl_TimeAdjust(TMC_INST *instPtr, const TIME_WORD *tmWord, TIMECTRL_AD
|
||||
void TimeCtrl_CalculateTimeGap(const TIME_WORD *a, const TIME_WORD *b, TIME_WORD *gap);
|
||||
|
||||
#endif /* TIME_SYNC_H_ */
|
||||
|
||||
/** @} */
|
||||
Reference in New Issue
Block a user