From 65062d0d5b21f838aa0043a15ce54cfab8d72c43 Mon Sep 17 00:00:00 2001
From: wujiazhi <1147861305@qq.com>
Date: Tue, 11 Jun 2024 14:23:53 +0800
Subject: [PATCH] 1.Fixed communication failure between MCU and wireless module 2.Fix the wrong judgment of alkaline lithium power

---
 Function/LCD/lcd_io_api.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/Function/LCD/lcd_io_api.c b/Function/LCD/lcd_io_api.c
index 36ecd39..5825f0b 100644
--- a/Function/LCD/lcd_io_api.c
+++ b/Function/LCD/lcd_io_api.c
@@ -19,7 +19,7 @@
 #include "math.h"
 #include "gpio.h"
 
-uint8_t	LCD_Buffer[SEGNUM] = {0};
+uint8_t	LCD_buffer[Segnum] = {0};
 
 
 void Lcd_IO_Init(void)
@@ -40,16 +40,16 @@
 	uint8_t i = 0;
 #if SOFT_OR_HARD	
   I2c_Start();
-	I2c_Send(LCD_ADDR_WRITE);
-	I2c_Send(LCD_REG_DATA_ADDR);
+	I2c_Send(LCD_WRITE);
+	I2c_Send(LCD_REG_DATA);
 	I2c_Send(sadd);
 	for(i = 0 ;i < len;i++)
 		I2c_Send(pBuffer[i]);
 	I2c_Stop();
 #else
 	I2C_Send_Bit(I2C0,STARTBIT);
-	I2C_Send_Byte(I2C0,LCD_ADDR_WRITE);
-	I2C_Send_Byte(I2C0,LCD_REG_DATA_ADDR);
+	I2C_Send_Byte(I2C0,LCD_WRITE);
+	I2C_Send_Byte(I2C0,LCD_REG_DATA);
 	I2C_Send_Byte(I2C0,sadd);
 	for(i = 0 ;i < len;i++)
 		I2C_Send_Byte(I2C0,pBuffer[i]);
@@ -62,14 +62,14 @@
 	uint8_t i = 0;
 #if SOFT_OR_HARD		
   I2c_Start();
-	I2c_Send(LCD_ADDR_WRITE);
+	I2c_Send(LCD_WRITE);
 	I2c_Send(cmd_add);
 	for(i = 0 ;i < len;i++)
 		I2c_Send(pBuffer[i]);
 	I2c_Stop();
 #else
 	I2C_Send_Bit(I2C0,STARTBIT);
-	I2C_Send_Byte(I2C0,LCD_ADDR_WRITE);
+	I2C_Send_Byte(I2C0,LCD_WRITE);
 	I2C_Send_Byte(I2C0,cmd_add);
 	for(i = 0 ;i < len;i++)
 		I2C_Send_Byte(I2C0,pBuffer[i]);
@@ -84,14 +84,14 @@
 show_type-1С���������λ��show_type-0С���������λ
 ˵��������������������λ���ƣ���һ��9����λ���������ݵ�ʱ����Ҫ����������ռһ����λ�����
 **************************************/
-void Lcd_DisplayFirstLine_23A(uint8_t show_type,double number)
+void Lcd_DisplayFirstLine_23A(u8 show_type,double number)
 {
 	uint64_t  number_div, number_10000, number_1000;
 	uint8_t		array[9] = { 0 };
 	uint8_t		yu_temp;
 	uint8_t		num_array = 0;
 	uint8_t		i;
-	uint8_t signflag = 0;
+	u8 signflag = 0;
 
 	if (number < 0)  //�жϸ����Ƿ�Ϊ����
 	{
@@ -260,7 +260,7 @@
 show_type-1С���������λ��show_type-0С���������λ
 ˵��������������������λ���ƣ��ڶ���6����λ���������ݵ�ʱ����Ҫ����������ռһ����λ�����
 *********************************/
-void Lcd_DisplaySecondLine_23A(uint8_t show_type,double number)
+void Lcd_DisplaySecondLine_23A(u8 show_type,double number)
 {
 	uint32_t  number_div, number_10000, number_1000;
 #ifdef LCD_NEW
@@ -271,7 +271,7 @@
 	uint8_t		yu_temp;
 	uint8_t		num_array = 0;
 	uint8_t		i;
-	uint8_t signflag = 0;
+	u8 signflag = 0;
 
 	if (number < 0)  //�жϸ����Ƿ�Ϊ����
 	{
@@ -523,7 +523,7 @@
  *������LCD_DisplayDigit(9,8 )����9����8�֡�����ʾ8
  *ʱ�䣺220818
 *********************************************/
-void Lcd_DisplayDigit_23A(unsigned char Position ,uint8_t Digit)
+void Lcd_DisplayDigit_23A(unsigned char Position ,u8 Digit)
 {
 #ifdef LCD_NEW
 	 switch(Position)

--
Gitblit v1.9.3