From 1105733dc07562240bd061a1d8b0869c8c596805 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Thu, 09 Oct 2025 00:41:09 +0800
Subject: [PATCH] ISL1208 RTC示例程序

---
 Core/Src/main.c |   21 +++++----------------
 1 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/Core/Src/main.c b/Core/Src/main.c
index 5f8f55a..4e17432 100644
--- a/Core/Src/main.c
+++ b/Core/Src/main.c
@@ -28,8 +28,7 @@
 /* USER CODE BEGIN Includes */
 #include "miscdev.h"
 #include "sht20.h"
-#include "w25q.h"
-#include "hal_oled.h"
+#include "isl1208.h"
 /* USER CODE END Includes */
 
 /* Private typedef -----------------------------------------------------------*/
@@ -72,8 +71,7 @@
 {
 
   /* USER CODE BEGIN 1 */
-  int pos_x = 25;
-  int pos_y = 1;
+
   /* USER CODE END 1 */
 
   /* MCU Configuration--------------------------------------------------------*/
@@ -102,7 +100,8 @@
   /* USER CODE BEGIN 2 */
 
   beep_start(2, 300);
-  OLED_Init();
+  printf("ISKBoard ISL1208 RTC example.\r\n");
+  set_rtctime("2025-08-08 08:08:08");
 
   /* USER CODE END 2 */
 
@@ -110,17 +109,7 @@
   /* USER CODE BEGIN WHILE */
   while (1)
   {
-    OLED_Clear();
-    OLED_ShowString(pos_x, pos_y, "ISKBoard", OLED_FONT16);
-    HAL_Delay(1000);
-
-    OLED_Clear();
-    for(int i=0; i<HZK_LEN_LINGYUN; i++)
-        OLED_ShowChinese(Hzk_LingYun, pos_x+i*16, pos_y, i);
-    HAL_Delay(1000);
-
-    OLED_Clear();
-    OLED_DrawBMP(0,0, X_WIDTH,Y_WIDTH/2, bmp_logo);
+	print_rtctime();
     HAL_Delay(1000);
 
     /* USER CODE END WHILE */

--
Gitblit v1.9.1