#include "lcdDrv.h" #include "osi_api.h" #include "osi_log.h" #include "hal_gouda.h" #include "drv_lcd.h" #include "gui.h" #include "log.h" #define LCD_DRV_ID_ST7735 0x7c89f0 static void _lcdDelayMs(int ms_delay) { osiDelayUS(ms_delay * 1000); } static void cmdDataSet(unsigned char cmd, unsigned char *data, int datalen){ int i; LCD_CtrlWrite_ST7735(cmd); for(i=0;i=0) return; if(++errCnt%20) MSG_WARN(1,"lcd bus errcnt:%d",errCnt); } void LCD_CtrlWrite_ST7735(unsigned char cmd){ int i=100; do{ if(HAL_ERR_NO==halGoudaWriteCmd(cmd)) break; }while(--i>0); showBusErrInfo(i); } void LCD_DataWrite_ST7735(unsigned char data){ int i=100; do{ if(HAL_ERR_NO==halGoudaWriteData(data)) break; }while(--i>0); showBusErrInfo(i); } void LCD_DataRead_ST7735(unsigned char *reg, unsigned char *data, unsigned int readLen){ halGoudaReadData(reg, data, readLen); }