forked from SZV10X_Software/SZV103_FM33A0xxEV_SiZhu

wujiazhi
2024-06-11 65062d0d5b21f838aa0043a15ce54cfab8d72c43
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)