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 |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/Function/LCD/lcd_io_api.c b/Function/LCD/lcd_io_api.c
index 904dff6..5825f0b 100644
--- a/Function/LCD/lcd_io_api.c
+++ b/Function/LCD/lcd_io_api.c
@@ -19,16 +19,16 @@
 #include "math.h"
 #include "gpio.h"
 
-uint8_t	LCD_Buffer[SEGNUM] = {0};
+uint8_t	LCD_buffer[Segnum] = {0};
 
 
-void Lcd_GPIO_Init(void)
+void Lcd_IO_Init(void)
 {
 	CMU_PERCLK_SetableEx(PADCLK, ENABLE);  //PADʱ�ӣ�GPIO��ʹ�ܺ���
 	
 	OutputIO(LCD_PWR_GPIO_PORT,LCD_PWR_PIN,OUT_PUSHPULL);
-//	OutputIO(LCD_BACKLIGHT_PWR_GPIO_PORT,LCD_BACKLIGHT_PWR_PIN,OUT_PUSHPULL);
-//	LCD_BACKLIGHT_OFF;
+	OutputIO(LCD_BACKLIGHT_PWR_GPIO_PORT,LCD_BACKLIGHT_PWR_PIN,OUT_PUSHPULL);
+	LCD_BACKLIGHT_OFF;
 	LCD_PWR_OFF;
 }
 
@@ -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]);

--
Gitblit v1.9.3