Common Update: Better Doxygen Style

This commit is contained in:
bit-cyber-fh
2024-03-28 00:00:59 +08:00
parent 9b416114a1
commit bab91e13df
43 changed files with 1800 additions and 1195 deletions
+17 -12
View File
@@ -1,22 +1,21 @@
/*****************************************************************************/
/**
* Description: System bus protocol implementation file.
* @file systembus.c
* @author FanHao ([email protected])
* @brief System bus protocol implementation file.
* @version 0.1
* @date 2023-05-06
*
* Date: 2023-05-06 10:13
* Last Edit Time: [2023-05-06 21:45]
*
* Revisions: Rev 0.0
* History:
* [2023-05-06]: Initial version.
* [2023-09-13]: Update to 485 protocol-20220816
*
* Copyright(c) 2021 Beijing Institute of Technology.
* @copyright Copyright(c) 2024 Beijing Institute of Technology.\n
* Lab of Communication and Network
*
******************************************************************************/
/**
* @addtogroup SystemBus
* @{
*/
/***************************** Include Files *********************************/
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
@@ -31,6 +30,10 @@
#include "../system_monitor.h"
/************************** Constant Definitions *****************************/
/**
* @name SystemBus_MSG_Constants
* @{
*/
// Common Field
// -- Command word
#define WD_CMD 0x00
@@ -192,7 +195,7 @@
// My Production Type
#define MY_PRD_ID PRD_DL_K
/** @} SystemBus_MSG_Constants*/
/************************** Function Prototypes ******************************/
static int32_t SystemBus_GenSelfTestRsp(SYSBUS *instPtr);
static int32_t SystemBus_SystemConfig(SYSBUS *instPtr, uint8_t *msg);
@@ -752,3 +755,5 @@ recv_error:
free(sysbusReq);
return Status;
}
/** @} SystemBus*/
+35 -23
View File
@@ -1,18 +1,20 @@
/*****************************************************************************/
/**
* Description: System bus protocol head file.
* @file systembus.h
* @author FanHao ([email protected])
* @brief System bus protocol header file.
* @version 0.1
* @date 2023-05-06
*
* Date: 2023-05-06 10:12
* Last Edit Time: [2023-05-06 10:13]
*
* Revisions: Rev 0.0
* History:
* [2023-05-06]: Initial version.
*
* Copyright(c) 2021 Beijing Institute of Technology.
* @copyright Copyright(c) 2024 Beijing Institute of Technology.\n
* Lab of Communication and Network
*
******************************************************************************/
/**
* @defgroup SystemBus
* @{
*/
#ifndef __SYSTEMBUS_H_
#define __SYSTEMBUS_H_
@@ -25,26 +27,34 @@
/************************** Constant Definitions *****************************/
/************************** Data Type Definitions ****************************/
// Definition of SystemBus instance.
/**
* @struct SystemBus Config
* @brief SystemBus Config struct holds SystemBus initialization parameters
*/
typedef struct
{
uintptr_t baseAddr;
uint32_t txQueueMax;
uint32_t rxQueueMax;
uintptr_t baseAddr; ///< base address in memory
uint32_t txQueueMax; ///< maximum tx queue length
uint32_t rxQueueMax; ///< maximum rx queue length
} SYSBUS_CONFIG;
/**
* @struct SystemBus Instance
* @brief SystemBus Instance struct
*/
typedef struct
{
SYSBUS_CONFIG config;
SYSBUSLOG sysbusLog; // systembus log
LINKLOG linkLog; // Link layer log
PHYLOG phyLog; // Physical layer log
HWSTATE hwState; // Hardware status
SYSBUS_UART *uartInst;
CIRC_QUEUE *txQueue;
CIRC_QUEUE *rxQueue;
bool isRxDone;
bool isTxDone;
SYSBUS_CONFIG config; ///< SystemBus initialization parameters
SYSBUSLOG sysbusLog; ///< SystemBus log
LINKLOG linkLog; ///< Link layer log
PHYLOG phyLog; ///< Physical layer log
HWSTATE hwState; ///< Hardware status
SYSBUS_UART *uartInst; ///< physical uart controller instance
CIRC_QUEUE *txQueue; ///< tx queue
CIRC_QUEUE *rxQueue; ///< rx queue
bool isRxDone; ///< tx done indicator
bool isTxDone; ///< rx done indicator
} SYSBUS;
/************************** Function Prototypes ******************************/
@@ -64,3 +74,5 @@ bool SystemBus_IsTxBusy(SYSBUS *instPtr);
bool SystemBus_IsRxBusy(SYSBUS *instPtr);
#endif //__SYSTEMBUS_H_
/** @} SystemBus*/
+26 -10
View File
@@ -1,18 +1,26 @@
/*****************************************************************************/
/**
* Description: System bus uart driver implementation file.
* @file systembus_uart.h
* @author FanHao ([email protected])
* @brief System bus uart driver implementation file.
* @version 0.1
* @date 2023-05-06
*
* Date: 2023-05-06 10:59
* LastEditTime: 2023-05-06 21:56
* Revisions: Rev 0.0
* History:
* [2023-05-06]: Initial version.
*
* Copyright(c) 2022 Beijing Institute of Technology.
* @copyright Copyright(c) 2024 Beijing Institute of Technology.\n
* Lab of Communication and Network
*
******************************************************************************/
/**
* @addtogroup SystemBus
* @{
*/
/**
* @addtogroup SystemBus_UART
* @{
*/
/***************************** Include Files *******************************/
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
@@ -20,6 +28,10 @@
#include "systembus_uart.h"
#include "common.h"
/**
* @name SystemBus_UART_Driver_Constants
* @{
*/
// Control and status register
#define MODULE_VERSION 0
#define UART_STATUS 4
@@ -47,7 +59,7 @@
#define FRAME_CHECK_LEN 1 // CheckSum
#define FRAME_INFO_LEN 3 // CheckSum, Dummy and DataLen
#define FRAME_OVERHEAD_LEN 7 // CheckSum, Dummy and DataLen
/*************************** Function Definitions ****************************/
/** @} SystemBus_UART_Driver_Constants*/
/*****************************************************************************/
/**
@@ -246,3 +258,7 @@ bool SysbusUart_IsTxBusy(SYSBUS_UART *instPtr)
return false;
}
}
/** @} SystemBus_UART*/
/** @} SystemBus*/
+20 -8
View File
@@ -1,17 +1,25 @@
/*****************************************************************************/
/**
* Description: System bus uart driver implementation file.
* @file systembus_uart.h
* @author FanHao ([email protected])
* @brief System bus uart driver header file.
* @version 0.1
* @date 2023-05-06
*
* Date: 2023-05-06 10:59
* LastEditTime: 2023-05-06 21:48
* Revisions: Rev 0.0
* History:
* [2023-05-06]: Initial version.
*
* Copyright(c) 2022 Beijing Institute of Technology.
* @copyright Copyright(c) 2024 Beijing Institute of Technology.\n
* Lab of Communication and Network
*
******************************************************************************/
/**
* @addtogroup SystemBus
* @{
*/
/**
* @defgroup SystemBus_UART
* @{
*/
#ifndef SYSTEMBUS_UART_H
#define SYSTEMBUS_UART_H
@@ -96,3 +104,7 @@ bool SysbusUart_IsRxBusy(SYSBUS_UART *instPtr);
bool SysbusUart_IsTxBusy(SYSBUS_UART *instPtr);
#endif // SYSTEMBUS_UART_H
/** @} SystemBus_UART*/
/** @} SystemBus*/