mirror of
https://github.com/tpunix/HMCLOCK.git
synced 2025-12-06 08:12:48 +08:00
PCB版本自动识别
This commit is contained in:
@@ -356,6 +356,26 @@ void epd_screen_clean(int mode)
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
|
||||
int epd_detect(void)
|
||||
{
|
||||
int retv = 0;
|
||||
|
||||
epd_hw_open();
|
||||
epd_reset(1);
|
||||
epd_cmd(0x12); // SWRESET
|
||||
if(epd_busy()){
|
||||
epd_wait();
|
||||
retv = 1;
|
||||
}
|
||||
epd_hw_close();
|
||||
return retv;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
|
||||
#if 0
|
||||
|
||||
void epd_test(void)
|
||||
|
||||
@@ -54,6 +54,7 @@ void epd_sleep(void);
|
||||
void epd_window(int x1, int y1, int x2, int y2);
|
||||
void epd_screen_update(void);
|
||||
void epd_screen_clean(int mode);
|
||||
int epd_detect(void);
|
||||
|
||||
|
||||
extern u8 lut_p[];
|
||||
|
||||
@@ -180,7 +180,11 @@ void user_app_init(void)
|
||||
clock_interval = 60; // 60s
|
||||
adv_state = 0;
|
||||
fspi_config(0x00030605);
|
||||
epd_hw_init(0x23200700, 0x05210006, 104, 212, ROTATE_3); // for 2.13 board BW
|
||||
|
||||
epd_hw_init(0x23200700, 0x05210006, 104, 212, ROTATE_3); // 2.13黑白屏,6个测试点
|
||||
if(epd_detect()==0){
|
||||
epd_hw_init(0x23111000, 0x07210120, 104, 212, ROTATE_3); // 2.13黑白屏,5个测试点
|
||||
}
|
||||
|
||||
selflash(otp_boot);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user