From 4591fb259097955f0f784c530fb9df5256bd5a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=90=83=E6=B2=B9=E7=82=B8=E9=B8=A1?= <1425962791@qq.com> Date: Mon, 15 Sep 2025 10:34:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96=E7=94=B5?= =?UTF-8?q?=E5=8E=8B=E7=94=B5=E6=B5=81=E6=95=B0=E6=8D=AE=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Power_Pico/Core/Inc/adc.h | 2 ++ Power_Pico/Core/Src/adc.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Power_Pico/Core/Inc/adc.h b/Power_Pico/Core/Inc/adc.h index 9b9b77c..cd2cc96 100644 --- a/Power_Pico/Core/Inc/adc.h +++ b/Power_Pico/Core/Inc/adc.h @@ -70,6 +70,8 @@ void MX_ADC1_Init(void); /* USER CODE BEGIN Prototypes */ +void get_global_val_cur(float *valtage, float *current, uint8_t *cur_unit); + /* USER CODE END Prototypes */ #ifdef __cplusplus diff --git a/Power_Pico/Core/Src/adc.c b/Power_Pico/Core/Src/adc.c index eb05476..867d576 100644 --- a/Power_Pico/Core/Src/adc.c +++ b/Power_Pico/Core/Src/adc.c @@ -193,5 +193,10 @@ void HAL_ADC_MspDeInit(ADC_HandleTypeDef* adcHandle) } /* USER CODE BEGIN 1 */ - +void get_global_val_cur(float *valtage, float *current, uint8_t *cur_unit) +{ + *valtage = global_valtage; + *current = global_current; + *cur_unit = global_cur_unit; +} /* USER CODE END 1 */