feat: 移除sysmon文件, 合并至sysbus

This commit is contained in:
2025-06-24 16:53:40 +08:00
parent 044345f597
commit 9c24f66aae
12 changed files with 685 additions and 722 deletions
+8 -56
View File
@@ -21,7 +21,6 @@
* @{
*/
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
@@ -34,10 +33,10 @@
* @{
*/
// Control and status register
#define MODULE_VERSION 0
#define UART_STATUS 4
#define UART_SEND_CMD 8
#define UART_RECV_CNT 12
#define MODULE_VERSION 0x00000000U
#define UART_STATUS 0x0000004U
#define UART_SEND_CMD 0x00000008U
#define UART_RECV_CNT 0x0000000CU
// Status code
#define UART_STATUS_TX_BUSY 0x00010000
@@ -48,6 +47,10 @@
#define UART_RXBUFF_OFFSET 2048
#define UART_RXBUFF_MAX 1024
#if (UART_TXBUFF_MAX < UART_FRM_MAX || UART_RXBUFF_MAX < UART_FRM_MAX)
#error "UART_FRM_MAX exceeds the maximum value."
#endif
// Frame Data offsets
#define FRAME_HEAD_LOW 0x5A
#define FRAME_HEAD_HIGH 0x54
@@ -62,16 +65,6 @@
#define FRAME_OVERHEAD_LEN 7 // CheckSum, Dummy and DataLen
/** @} SystemBus_UART_Driver_Constants*/
/*****************************************************************************/
/**
* @brief Instance initial
*
* @param instPtr A pointer to frame uart instance structure.
* @param config Base address of frame uart, refer to "xparameters.h"
*
* @return None.
*
******************************************************************************/
int SysbusUart_Init(SYSBUS_UART **instPtr, SYSBUS_UART_CONFIG *config)
{
ASSERT(instPtr != NULL);
@@ -85,17 +78,6 @@ int SysbusUart_Init(SYSBUS_UART **instPtr, SYSBUS_UART_CONFIG *config)
return SUCCESS;
}
/*****************************************************************************/
/**
* @brief Send a system bus frame.
*
* @param instPtr A pointer to SYSBUS_UART instance structure.
* @param buff A pointer to send data buffer
* @param dLen A integer indicate the send data buffer length in byte.
*
* @return
*
******************************************************************************/
int SysbusUart_Send(SYSBUS_UART *instPtr, SYSBUS_UART_FRAME *frame)
{
ASSERT(instPtr != NULL);
@@ -154,16 +136,6 @@ int SysbusUart_Send(SYSBUS_UART *instPtr, SYSBUS_UART_FRAME *frame)
return SUCCESS;
}
/*****************************************************************************/
/**
* @brief Get last system bus frame.
*
* @param instPtr A pointer to SYSBUS_UART instance structure.
* @param buff A pointer to receive data buffer.
*
* @return
*
******************************************************************************/
int SysbusUart_Recv(SYSBUS_UART *instPtr, SYSBUS_UART_FRAME *frame)
{
ASSERT(instPtr != NULL);
@@ -212,16 +184,6 @@ int SysbusUart_Recv(SYSBUS_UART *instPtr, SYSBUS_UART_FRAME *frame)
return SUCCESS;
}
/*****************************************************************************/
/**
* @brief Get rx channel status.
*
* @param instPtr A pointer to SYSBUS_UART instance structure.
*
* @return true - SYSBUS_UART rx channel is busy.
* false - SYSBUS_UART rx channel is idle.
*
******************************************************************************/
bool SysbusUart_IsRxBusy(SYSBUS_UART *instPtr)
{
ASSERT(instPtr != NULL);
@@ -238,16 +200,6 @@ bool SysbusUart_IsRxBusy(SYSBUS_UART *instPtr)
}
}
/*****************************************************************************/
/**
* @brief Get tx channel status.
*
* @param instPtr A pointer to SYSBUS_UART instance structure.
*
* @return true - SYSBUS_UART tx channel is busy.
* false - SYSBUS_UART tx channel is idle.
*
******************************************************************************/
bool SysbusUart_IsTxBusy(SYSBUS_UART *instPtr)
{
ASSERT(instPtr != NULL);