formatted

This commit is contained in:
Gatsby Van
2024-02-20 17:40:18 +08:00
parent 6d08ee216a
commit 597ea2c7cd
3 changed files with 553 additions and 501 deletions
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -1,7 +1,7 @@
/*
* headless.h
*
* Created on: 2021Äê6ÔÂ8ÈÕ
* Created on: 2021��6��8��
* Author: Josh
*/
@@ -30,7 +30,8 @@
/**************************** Type Definitions *******************************/
/***************** Macros (Inline Functions) Definitions *********************/
#define HW_PRINT(...) __asm__("nop")
// #define HW_PRINT(...) printf(__VA_ARGS__)
/************************** Variable Definitions *****************************/
/************************** Function Prototypes ******************************/
+21 -9
View File
@@ -51,33 +51,39 @@ void ScuTimer_IntrHandler(void *context);
void Systembus_RxIntrHandler(void *context);
void Systembus_TxIntrHandler(void *context);
/************************** Constant Definitions *****************************/
struct callback_desc phy_callback_desc = {
struct callback_desc phy_callback_desc =
{
.callback = Phy_IntrHandler,
.ctx = NULL
};
struct callback_desc periodicpull_callback_desc = {
struct callback_desc periodicpull_callback_desc =
{
.callback = PeriodicPull_Handler,
.ctx = NULL
};
struct callback_desc sysbus_rx_callback_desc = {
struct callback_desc sysbus_rx_callback_desc =
{
.callback = Systembus_RxIntrHandler,
.ctx = NULL
};
struct callback_desc sysbus_tx_callback_desc = {
struct callback_desc sysbus_tx_callback_desc =
{
.callback = Systembus_TxIntrHandler,
.ctx = NULL
};
struct callback_desc scutm_callback_desc = {
struct callback_desc scutm_callback_desc =
{
.callback = ScuTimer_IntrHandler,
.ctx = NULL
};
L2_CONFIG linkConfig = {
L2_CONFIG linkConfig =
{
.myType = L2_NODE_HEAD,
.clustId = 1,
.myId = 1,
@@ -99,16 +105,22 @@ L2_CONFIG linkConfig = {
// .tmcInstPtr = NULL
// };
static PHY_CONFIG phyConfig = {
static PHY_CONFIG phyConfig =
{
.devId = 0,
.baseAddr = PHY_BASEADDR,
.antBramId = PHY_ANTCONFIG_BRAM_DEVICE_ID,
.txBramId = PHY_TXBUFF_BRAM_DEVICE_ID,
.rxBramId = PHY_RXBUFF_BRAM_DEVICE_ID,
.hwXadcId = PHY_HW_XADC_DEVICE_ID
.hwXadcId = PHY_HW_XADC_DEVICE_ID,
.get_clk_state = NULL,
.get_ad_lock_state = NULL,
.get_ad0_temp = NULL,
.get_ad1_temp = NULL
};
TMC_CONFIG tmcConfig = {
TMC_CONFIG tmcConfig =
{
.baseAddr = TIME_CONTROLLER_BASEADDR,
.reset = 10
};