From ee3c90168f81ce19529904d80f9c9de4fed23bb8 Mon Sep 17 00:00:00 2001
From: jinlicong <493886250@qq.com>
Date: Tue, 30 Apr 2024 16:30:45 +0800
Subject: [PATCH] 继续完善
---
HARDWARE/ADC/ADC.h | 59 +++++++++++++++++++++++++++++++----------------------------
1 files changed, 31 insertions(+), 28 deletions(-)
diff --git a/HARDWARE/ADC/ADC.h b/HARDWARE/ADC/ADC.h
index 43e99ce..da4cc89 100644
--- a/HARDWARE/ADC/ADC.h
+++ b/HARDWARE/ADC/ADC.h
@@ -1,37 +1,40 @@
+#ifndef _ADC_H_
+#define _ADC_H_
-/******************************************************************************
- * Copyright (C) 2014-2015 HangZhou SiZhu Co.,LTD.
- *
- *-----------------------------------------------------------------------------
- * File: adc.h
- * Description: head file of adc.c ,use arm inner adc1 to sample given voltage
- * Author: Lishoujian (867693272@qq.com)
- * Date: Jan 9, 2015
- *****************************************************************************/
+#include "define_all.h"
-/* ----------------------- Platform includes --------------------------------*/
-#ifndef __ADC_H
-#define __ADC_H
-#include "sys.h"
+//�ڲ��ۼ�
+//#define const_adc_Slope (*((uint16_t *)(0x1FFFFA84))) //ADCб�ʣ���1000��ʹ��
+//#define const_adc_Offset (*((int16_t *)(0x1FFFFA86))) //ADC�ؾ࣬��100��ʹ�ã���λmV
-#define AD_LENGTH 500
+//�ⲿ�ۼ�
+#define const_adc_Slope (*((uint16_t *)(0x1FFFFA88))) //ADCб�ʣ���1000��ʹ��
+#define const_adc_Offset (*((int16_t *)(0x1FFFFA8A))) //ADC�ؾ࣬��100��ʹ�ã���λmV
-#define ADC_dianchi_PIN_NUM GPIO_Pin_3
-#define ADC_dianchi_PIN_GROUP GPIOC
+//�ڲ��ۼ� �¶�
+#define const_T_30 *(uint16_t*) 0x1FFFFA92 //0X640 30����ֵ
-typedef struct ad_data_get
-{
- u16 *ad_get_address_p;
- u32 ad_buffer_cnt;
- u8 ad_ch;
+//�ⲿ�ۼ� �¶�
+#define const_T_30_14BIT *(uint16_t*) 0x1FFFFB54 //0X�ⲿ�ۼ� 16383��14bit�� 30����ֵ
-}ad_data_s;
+//ADC_IN4
+#define LIT_ADC_PORT GPIOD
+#define LIT_ADC_PIN GPIO_Pin_1
-double Temp_GetBFiltedData(ad_data_s * data_p);
-void Adc_set(u8 tem_flag);
-uint16 Get_vol_Average(u8 channel,u8 tem_flag);
-extern volatile u16 ad_data[1000];
-u16 Get_val(u8 ch);
-#endif
+//ADC_IN8
+#define ALK_ADC_PORT GPIOB
+#define ALK_ADC_PIN GPIO_Pin_3
+
+
+
+void ADC_LithIO_Init(void);
+void ADC_AlkaIO_Init(void);
+void ADC_IN5_Init(void);
+void ADC_IN4_Init(void);
+void ADC_IN8_Init(void);
+void ADC_Temp_Init(void);
+uint32_t Get_AdcValue(void);
+float Get_AdcTempValue(void);
+#endif
--
Gitblit v1.9.3