forked from 0xha0/df_datalink
Common Update: Better Doxygen Style
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
* Description: Time sync implementation file.
|
||||
*
|
||||
* Author: Author's name
|
||||
* Date: 2023-12-20 16:32
|
||||
* LastEditors: FanHao
|
||||
* LastEditTime: 2023-12-22 20:43
|
||||
* 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.c
|
||||
* @author FanHao ([email protected])
|
||||
* @brief Time sync controller driver implementation file.
|
||||
* @version 0.0
|
||||
* @date 2023-12-20
|
||||
* @copyright Copyright(c) 2024 Beijing Institute of Technology.\n
|
||||
* Lab of Communication and Network
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/**
|
||||
* @addtogroup TimeController_Driver
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
#include <string.h>
|
||||
#include "time_ctrl.h"
|
||||
@@ -23,6 +24,10 @@
|
||||
#include "util.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
/**
|
||||
* @name TimeController_REG_Constants
|
||||
* @{
|
||||
*/
|
||||
#define VERSION_REG 0x00000004
|
||||
#define TIME_INT_REG 0x00000008
|
||||
#define TIME_FRAC_REG 0x0000000C
|
||||
@@ -36,6 +41,9 @@
|
||||
#define CNTSTEP_OPT 0x0000002c
|
||||
|
||||
#define TM_RESET_CODE 0x5253542E
|
||||
|
||||
/** @} TimeController_REG_Constants*/
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
#define TMC_Read(instPtr, addr) IO_In32(instPtr->config.baseAddr + addr)
|
||||
#define TMC_Write(instPtr, addr, value) IO_Out32(instPtr->config.baseAddr + addr, value)
|
||||
@@ -295,4 +303,6 @@ void TimeCtrl_CalculateTimeGap(const TIME_WORD *a, const TIME_WORD *b, TIME_WORD
|
||||
timeDiff -= (uint64_t)a->frac_part;
|
||||
gap->frac_part = (TIME_FRAC)(timeDiff % TIME_FRAC_MAX);
|
||||
gap->frac_part = (TIME_INT)(timeDiff / TIME_FRAC_MAX);
|
||||
}
|
||||
}
|
||||
|
||||
/** @} TimeController_Driver*/
|
||||
Reference in New Issue
Block a user