From c7898003c0fe786cb94638981bb138ed3c811542 Mon Sep 17 00:00:00 2001 From: Gatsby Van Date: Tue, 20 Feb 2024 11:22:56 +0800 Subject: [PATCH] *add clock and ad status update api --- df_datalink_sp/src/main.c | 6 +++++- df_datalink_sp/src/networking/phy_layer/phy_layer.h | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/df_datalink_sp/src/main.c b/df_datalink_sp/src/main.c index e0c0cbe..335d3bc 100644 --- a/df_datalink_sp/src/main.c +++ b/df_datalink_sp/src/main.c @@ -101,7 +101,11 @@ static PHY_CONFIG phyConfig = { .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 = { diff --git a/df_datalink_sp/src/networking/phy_layer/phy_layer.h b/df_datalink_sp/src/networking/phy_layer/phy_layer.h index 7a75772..f930f80 100644 --- a/df_datalink_sp/src/networking/phy_layer/phy_layer.h +++ b/df_datalink_sp/src/networking/phy_layer/phy_layer.h @@ -183,6 +183,12 @@ typedef struct uint32_t antBramId; uint32_t hwXadcId; uintptr_t baseAddr; +#ifndef EMULATION + uint8_t (*get_clk_state)(void); + uint8_t (*get_ad_lock_state)(void); + uint8_t (*get_ad0_temp)(void); + uint8_t (*get_ad1_temp)(void); +#endif } PHY_CONFIG; typedef struct