1 /*
2  * Copyright (C) 2020-2023 Alibaba Group Holding Limited
3  */
4 #include <stdio.h>
5 #include <stdint.h>
6 #include <stdbool.h>
7 #include <ulog/ulog.h>
8 #include "oled/oled.h"
9 
oled_init(void)10 void oled_init(void)
11 {
12     sh1106_init();
13 }
14 
oled_show(oled_str_e str)15 void oled_show(oled_str_e str)
16 {
17     OLED_Clear();
18     if (str == OLED_STR_WAKEUP) {
19         OLED_Show_String(14, 24, "Hi, I am here!", 16, 1);
20     } else if (str == OLED_STR_IDLE) {
21         OLED_Show_String(6, 12, "I am your HaaS", 16, 1);
22         OLED_Show_String(4, 30, "voice assistant!", 16, 1);
23     } else if (str == OLED_STR_LIGHT_ON) {
24         OLED_Show_String(14, 24, "Turn on ...", 16, 1);
25     } else if (str == OLED_STR_LIGHT_OFF) {
26         OLED_Show_String(14, 24, "Turn off ...", 16, 1);
27     }
28     OLED_Refresh_GRAM();
29 }
30