#ifndef  __API_16C23_H
#define __API_16C23_H
EXTERN_VAR INT8U test;


EXTERN_VAR  	INT8U   tft_TFT_INIT_FF;    //1Һ������ʼ����   0δ
void delay_300ns(void);
void delay_900ns(void);
void delay_1600ns(void);
void I2C_NAck(void); 
void I2C_Ack(void);
void I2C_Send(byte txd);
void I2C_Start(void); 
void I2C_Stop(void);
void I2C_sendcmd(byte para);
void I2C_senddat(byte orig);
void Ht16c23_Init(byte on );
//void Ht16c23_CT_Init(byte on );
void Api_LCD_Clear_Symbol(void);
void Show_always_center_lcd (void);
//����gpio
void test_group(unsigned char  num);
void Test_gpio(unsigned char gpio_group,unsigned char gpio_num,unsigned char status);



#define   PPPP       0X07
#define   RRRR       0X08 
#define   NNNN       0X09 
#define   DDDD       0X0A 
#define   SSSS       0X0B  
#define   N_VOID     10
#define   N_STANDBY  11

#define   SLAVE       0x7E //16C22,0x7C->16C23 
#define   DMOD        0X82
#define   BIASDUTY_NORMAL   0X00  //1/3 BIAS  1/4 DUTY
#define   FRAME       0X86
#define   FRAME_160   0x01 
#define   IVA         0X8A 
#define   IVA_NORMAL  0x20 
#define   DATAIN      0X80 
#define   ADD_ORIG   0// 0//0X02
#define   SYSMOD      0X84 
#define   SYSMOD_ON   0X03
#define   SYSMOD_OFF   0X00
EXTERN_VAR  LCD_RAMTYPE   tb_add[28];
 
 
void Show_num(byte grp,byte num);
void T_BOX_Show_num(byte grp, byte num);

void Show_Grp(const byte * ptr,byte size_long,byte onoff);
void Show_Elm( byte elm,byte onoff);
void Show_Liner(const byte * ptr,byte size_long,byte num);
void Show_QY1(byte num);
void Show_QY2(byte num);

 //
 #pragma CODE_SEG OTHER_ROM
 void Gui_time_Disp(void); 
 void Gui_Tirp_Disp(void);
 void T_BOX_Disp(void);
 void Gui_ODO_Disp (void);
 void Gui_InstFuel_Disp(void);
 void Gui_AvgFuel_Disp(void);
 void Gui_Icon(void);
 void Gui_SetRadio(void);
 void Show_TLY(byte num);
 void QY1_Disp(void);
 void QY2_Disp(void);
 #pragma CODE_SEG DEFAULT
 //
 extern const byte base_part[10];
 extern const byte ful_part[8];
 extern const byte tep_part[8];
 extern const byte blk_part[7];
 extern const byte a_part[8];
 extern const byte b_part[8];
 extern const byte part1[6];
 extern const byte part2[6];
 extern const byte part3[6];
 extern const byte part4[6]; 
 extern const byte prnd[4][8];
 extern const byte prnd_num[12][4];

//******quwenlong*******
 extern const byte tb_num[16][7];
 extern  const byte mod_num[12]; 
 extern const byte TLY[8] ;
 extern const byte T_BOX[4] ;

 extern  const byte radar_left[3];
 extern const byte radar_center[3];
 extern const byte radar_right[3];
 
extern const byte ENG_part[6];
extern const byte QYB_UP[12];   
extern const byte QYB_DOWN[12] ;


#define SEG_100KPA     tb_add[7].bbit.a0
#define SEG_CNG     tb_add[9].bbit.a3
#define SEG_FUEL    tb_add[9].bbit.a3  
#define SEG_FAI     tb_add[9].bbit.a6 
#define SEG_L100KM  tb_add[9].bbit.a5 
#define SEG_KM      tb_add[9].bbit.a4
#define SEG_CAR     tb_add[10].bbit.a3
#define SEG_TO      tb_add[10].bbit.a2
#define SEG_KEY3    tb_add[10].bbit.a7
#define SEG_KM1     tb_add[16].bbit.a3
#define SEG_DP1     tb_add[17].bbit.a3
#define SEG_G3      tb_add[18].bbit.a3
#define SEG_ODO     tb_add[19].bbit.a2
#define SEG_TRIP    tb_add[19].bbit.a1
#define SEG_G2      tb_add[19].bbit.a0
#define SEG_DP      tb_add[21].bbit.a0
#define SEG_H       tb_add[22].bbit.a0   //  "/h"
#define SEG_CT      tb_add[23].bbit.a7
#define SEG_ZQ      tb_add[23].bbit.a3   
#define SEG_YQ      tb_add[24].bbit.a3   
#define SEG_FUF     tb_add[15].bbit.a1  
#define SEG_FUK     tb_add[15].bbit.a0
#define SEG_SP     tb_add[26].bbit.a7
#define SEG_QF     tb_add[9].bbit.a0

#define SEG_L1      tb_add[23].bbit.a2
#define SEG_L2      tb_add[23].bbit.a1
#define SEG_L3      tb_add[23].bbit.a0
#define SEG_L4      tb_add[23].bbit.a6
#define SEG_L5      tb_add[23].bbit.a5
#define SEG_L6      tb_add[23].bbit.a4
#define SEG_L7      tb_add[24].bbit.a2
#define SEG_L8      tb_add[24].bbit.a1
#define SEG_L9      tb_add[24].bbit.a0



 //*********************

 #endif