oled_common.cpp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. #include "stm32g4xx_hal.h"
  2. #include "oled_common.h"
  3. #include "oled_config.h"
  4. #include "config.h"
  5. #include "i2c_bridge.h"
  6. #include "spi_bridge.h"
  7. #include "logo_grayscale.h"
  8. #include "fonts.h"
  9. #include "SSD1327.h"
  10. #include "cmsis_os.h"
  11. #include <string.h>
  12. extern "C" {
  13. #include "GFX_SSD1327.h"
  14. #include "GUI_Paint.h"
  15. #include "fonts.h"
  16. #include "fonts_old.h"
  17. }
  18. #if defined(I2C_BRIDGE)
  19. I2C_HandleTypeDef *i2c_bridge;
  20. #elif defined(SPI_BRIDGE)
  21. SPI_HandleTypeDef *spi_bridge;
  22. #endif
  23. uint8_t oled_buf[OLED_BUF_SIZE];
  24. //
  25. void init_oled(void)
  26. {
  27. init_gpio_oled();
  28. oled_reset();
  29. #if defined(I2C_BRIDGE)
  30. i2c_bridge_init();
  31. i2c_bridge = i2c_get_bridge();
  32. #elif defined(SPI_BRIDGE)
  33. spi_bridge_init();
  34. spi_bridge = spi_get_bridge();
  35. #endif
  36. oled_init();
  37. Paint_NewImage(oled_buf, OLED_WIDTH, OLED_HEIGHT, 0, BLACK);
  38. Paint_SetScale(16);
  39. Paint_SelectImage(oled_buf);
  40. oled_clear(BLACK);
  41. #if 0
  42. test_oled();
  43. while(1) {}
  44. #endif
  45. oled_display();
  46. }
  47. //
  48. void init_gpio_oled(void)
  49. {
  50. GPIO_InitTypeDef GPIO_InitStruct = {0};
  51. __HAL_RCC_GPIOA_CLK_ENABLE();
  52. // GPIOA_5 - reset
  53. GPIO_InitStruct.Pin = OLED_RST_PIN;
  54. GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  55. GPIO_InitStruct.Pull = GPIO_NOPULL;
  56. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  57. HAL_GPIO_Init(OLED_RST_PORT, &GPIO_InitStruct);
  58. // GPIOA_6 - DC
  59. GPIO_InitStruct.Pin = OLED_DC_PIN;
  60. HAL_GPIO_Init(OLED_DC_PORT, &GPIO_InitStruct);
  61. HAL_GPIO_WritePin(OLED_RST_PORT, OLED_RST_PIN, GPIO_PIN_RESET);
  62. #if defined(I2C_BRIDGE)
  63. HAL_GPIO_WritePin(OLED_DC_PORT, OLED_DC_PIN, GPIO_PIN_SET);
  64. #elif defined(SPI_BRIDGE)
  65. HAL_GPIO_WritePin(OLED_DC_PORT, OLED_DC_PIN, GPIO_PIN_RESET);
  66. #endif
  67. }
  68. //
  69. void oled_reset(void)
  70. {
  71. OLED_RST_1;
  72. oled_delay_ms(100);
  73. OLED_RST_0;
  74. oled_delay_ms(100);
  75. OLED_RST_1;
  76. oled_delay_ms(100);
  77. }
  78. //
  79. void oled_delay_ms(uint32_t ms)
  80. {
  81. osDelay(ms);
  82. }
  83. // TODO убрать sizeof
  84. void oled_command(uint8_t com)
  85. {
  86. #ifdef I2C_BRIDGE
  87. HAL_I2C_Mem_Write(i2c_bridge, OLED_I2C_ADDR, 0x00, 1, &com, sizeof(com), 100);
  88. #endif
  89. #ifdef SPI_BRIDGE
  90. OLED_DC_0;
  91. OLED_CS_0;
  92. HAL_SPI_Transmit(spi_bridge, &com, 1, 10);
  93. OLED_CS_1;
  94. #endif
  95. }
  96. // TODO убрать sizeof
  97. void oled_data(uint8_t dat)
  98. {
  99. #ifdef I2C_BRIDGE
  100. HAL_I2C_Mem_Write(i2c_bridge, OLED_I2C_ADDR, 0x40, 1, &dat, sizeof(dat), 100);
  101. #endif
  102. #ifdef SPI_BRIDGE
  103. OLED_DC_1;
  104. OLED_CS_0;
  105. HAL_SPI_Transmit(spi_bridge, &dat, 1, 10);
  106. OLED_CS_1;
  107. #endif
  108. }
  109. //
  110. void oled_display(void)
  111. {
  112. oled_command(SSD1327_SETCOLUMNADDRESS);
  113. oled_command(0x00);
  114. oled_command(0x3F);
  115. oled_command(SSD1327_SETROWADDRESS);
  116. oled_command(0x00);
  117. oled_command(0x7F);
  118. #ifdef I2C_BRIDGE
  119. HAL_I2C_Mem_Write(i2c_bridge, OLED_I2C_ADDR, 0x40, 1, (uint8_t*)&oled_buf, OLED_BUF_SIZE, 1000);
  120. #endif
  121. #ifdef SPI_BRIDGE
  122. OLED_DC_1;
  123. OLED_CS_0;
  124. HAL_SPI_Transmit(spi_bridge, (uint8_t*)&oled_buf, OLED_BUF_SIZE, 100);
  125. OLED_CS_1;
  126. #endif
  127. }
  128. //
  129. void oled_bitmap(uint8_t *bitmap)
  130. {
  131. oled_command(0x22);
  132. oled_command(0x00);
  133. oled_command(0x07);
  134. #ifdef I2C_BRIDGE
  135. HAL_I2C_Mem_Write(i2c_bridge, OLED_I2C_ADDR, 0x40, 1, bitmap, (OLED_HEIGHT * OLED_WIDTH / 8), 100);
  136. #endif
  137. #ifdef SPI_BRIDGE
  138. OLED_DC_1;
  139. OLED_CS_0;
  140. HAL_SPI_Transmit(spi_bridge, bitmap, (OLED_HEIGHT * OLED_WIDTH / 8), 100);
  141. OLED_CS_1;
  142. #endif
  143. }
  144. //
  145. void oled_invert_colors(uint8_t invert)
  146. {
  147. oled_command(invert ? SSD1327_INVERTDISPLAY : SSD1327_NORMALDISPLAY);
  148. }
  149. //
  150. void oled_rotate_display(uint8_t rotate)
  151. {
  152. if (rotate > 1) rotate = 1;
  153. oled_command(0xA0 | (0x01 & rotate)); // Set Segment Re-Map Default
  154. // 0xA0 (0x00) => column Address 0 mapped to 127
  155. // 0xA1 (0x01) => Column Address 127 mapped to 0
  156. oled_command(0xC0 | (0x08 & (rotate<<3))); // Set COM Output Scan Direction
  157. // 0xC0 (0x00) => normal mode (RESET) Scan from COM0 to COM[N-1];Where N is the Multiplex ratio.
  158. // 0xC8 (0xC8) => remapped mode. Scan from COM[N-1] to COM0;;Where N is the Multiplex ratio.
  159. }
  160. //
  161. void oled_display_on(uint8_t on)
  162. {
  163. oled_command(on ? SSD1327_DISPLAYON : SSD1327_DISPLAYOFF);
  164. }
  165. //
  166. void oled_set_contrast(uint8_t contrast)
  167. {
  168. oled_command(SSD1327_SETCONTRASTCURRENT); // Set Contrast Control
  169. oled_command(contrast);
  170. }
  171. //
  172. void oled_start_scroll_right(uint8_t start_page, uint8_t end_page, uint8_t speed)
  173. {
  174. oled_command(SSD1327_RIGHT_HORIZONTAL_SCROLL);
  175. oled_command(0x00);
  176. oled_command(start_page);
  177. oled_command(speed);
  178. oled_command(end_page);
  179. oled_command(SSD1327_ACTIVATE_SCROLL);
  180. }
  181. //
  182. void oled_start_scroll_left(uint8_t start_page, uint8_t end_page, uint8_t speed)
  183. {
  184. oled_command(SSD1327_LEFT_HORIZONTAL_SCROLL);
  185. oled_command(0x00);
  186. oled_command(start_page);
  187. oled_command(speed);
  188. oled_command(end_page);
  189. oled_command(SSD1327_ACTIVATE_SCROLL);
  190. }
  191. //
  192. void oled_stop_scroll(void)
  193. {
  194. oled_command(SSD1327_DEACTIVATE_SCROLL);
  195. }
  196. //
  197. void oled_init(void)
  198. {
  199. oled_command(0xae);//--turn off oled panel
  200. oled_command(0x15); // set column address
  201. oled_command(0x00); // start column 0
  202. oled_command(0x7f); // end column 127
  203. oled_command(0x75); // set row address
  204. oled_command(0x00); // start row 0
  205. oled_command(0x7f); // end row 127
  206. oled_command(0x81); // set contrast control
  207. oled_command(0x80);
  208. oled_command(0xa0); // gment remap
  209. oled_command(0x51); //51
  210. oled_command(0xa1); // start line
  211. oled_command(0x00);
  212. oled_command(0xa2); // display offset
  213. oled_command(0x00);
  214. oled_command(0xa4); // rmal display
  215. oled_command(0xa8); // set multiplex ratio
  216. oled_command(0x7f);
  217. oled_command(0xb1); // set phase leghth
  218. oled_command(0xf1);
  219. oled_command(0xb3); // set dclk
  220. oled_command(0x00); //80Hz:0xc1 90Hz:0xe1 100Hz:0x00 110Hz:0x30 120Hz:0x50 130Hz:0x70 01
  221. oled_command(0xab); //
  222. oled_command(0x01); //
  223. oled_command(0xb6); // set phase leghth
  224. oled_command(0x0f);
  225. oled_command(0xbe);
  226. oled_command(0x0f);
  227. oled_command(0xbc);
  228. oled_command(0x08);
  229. oled_command(0xd5);
  230. oled_command(0x62);
  231. oled_command(0xfd);
  232. oled_command(0x12);
  233. oled_display_on(1);
  234. #if 0
  235. // Рабочий вариант
  236. oled_command(0xae);//--turn off oled panel
  237. oled_command(0x15); // set column address
  238. oled_command(0x00); // start column 0
  239. oled_command(0x7f); // end column 127
  240. oled_command(0x75); // set row address
  241. oled_command(0x00); // start row 0
  242. oled_command(0x7f); // end row 127
  243. oled_command(0x81); // set contrast control
  244. oled_command(0x80);
  245. oled_command(0xa0); // gment remap
  246. oled_command(0x51); //51
  247. oled_command(0xa1); // start line
  248. oled_command(0x00);
  249. oled_command(0xa2); // display offset
  250. oled_command(0x00);
  251. oled_command(0xa4); // rmal display
  252. oled_command(0xa8); // set multiplex ratio
  253. oled_command(0x7f);
  254. oled_command(0xb1); // set phase leghth
  255. oled_command(0xf1);
  256. oled_command(0xb3); // set dclk
  257. oled_command(0x00); //80Hz:0xc1 90Hz:0xe1 100Hz:0x00 110Hz:0x30 120Hz:0x50 130Hz:0x70 01
  258. oled_command(0xab); //
  259. oled_command(0x01); //
  260. oled_command(0xb6); // set phase leghth
  261. oled_command(0x0f);
  262. oled_command(0xbe);
  263. oled_command(0x0f);
  264. oled_command(0xbc);
  265. oled_command(0x08);
  266. oled_command(0xd5);
  267. oled_command(0x62);
  268. oled_command(0xfd);
  269. oled_command(0x12);
  270. oled_display_on(1);
  271. #endif
  272. #if 0
  273. oled_command(SSD1327_DISPLAYOFF); // Display Off
  274. oled_command(SSD1327_SETCOLUMNADDRESS);
  275. oled_command(0x00);
  276. oled_command(0x7F);
  277. oled_command(SSD1327_SETROWADDRESS);
  278. oled_command(0x00);
  279. oled_command(0x7F);
  280. oled_set_contrast(0x7F);
  281. oled_command(SSD1327_SEGREMAP);
  282. oled_command(0x51);
  283. oled_command(SSD1327_SETDISPLAYSTARTLINE);
  284. oled_command(0x00);
  285. oled_command(SSD1327_SETDISPLAYOFFSET);
  286. oled_command(0x0);
  287. oled_command(SSD1327_DISPLAYALLON_RESUME); // Entire Display ON
  288. oled_command(SSD1327_SETMULTIPLEX);
  289. oled_command(0x7F);
  290. oled_command(SSD1327_SETPHASELENGTH);
  291. oled_command(0xF1); // !
  292. oled_command(SSD1327_SETFRONTCLOCKDIVIDER_OSCILLATORFREQUENCY);
  293. oled_command(0x00);
  294. oled_command(SSD1327_FUNCTIONSELECTIONA); // !
  295. oled_command(0x01); // !
  296. oled_command(SSD1327_SETSECONDPRECHARGEPERTIOD);
  297. oled_command(0x0F); // !
  298. oled_command(SSD1327_SETSETVCOMVOLTAGE);
  299. oled_command(0x0F); // !
  300. oled_command(SSD1327_SETPRECHARGEVOLTAGE);
  301. oled_command(0x08); // !
  302. oled_command(SSD1327_FUNCTIONSELECTIONB);
  303. oled_command(0x62);
  304. oled_command(SSD1327_SETCOMMANDLOCK); // !
  305. oled_command(0x12); // !
  306. oled_display_on(1);
  307. #endif
  308. }
  309. //
  310. void oled_draw_pixel(int16_t x, int16_t y, uint8_t color)
  311. {
  312. if ((x < 0) || (x >= OLED_WIDTH) || (y < 0) || (y >= OLED_HEIGHT))
  313. return;
  314. uint8_t SelectedCell = oled_buf[x/2 + y*(OLED_WIDTH/2)];
  315. if(x % 2)
  316. {
  317. SelectedCell &= ~(0x0F);
  318. SelectedCell |= (0x0F & color);
  319. }
  320. else
  321. {
  322. SelectedCell &= ~(0xF0);
  323. SelectedCell |= (0xF0 & (color<<4));
  324. }
  325. oled_buf[x/2 + y*(OLED_WIDTH/2)] = SelectedCell;
  326. }
  327. //
  328. void oled_clear(uint8_t color)
  329. {
  330. if (color > WHITE) color = WHITE;
  331. memset(oled_buf, (color << 4 | color), OLED_BUF_SIZE);
  332. }
  333. //
  334. void oled_dma_end_callback(SPI_HandleTypeDef *hspi)
  335. {
  336. #if defined(SPI_BRIDGE)
  337. if (hspi == spi_bridge) {
  338. OLED_CS_1;
  339. }
  340. #endif
  341. }
  342. // ------------------------------------------------------------------------------- //
  343. //
  344. void oled_draw_rec(int x_start, int y_start, int x_end, int y_end, uint8_t color)
  345. {
  346. for (int i = 0; i < y_end; i++) {
  347. GFX_DrawLine(x_start, y_start + i, x_end, y_start + i, color);
  348. }
  349. GFX_DrawLine(x_start, y_end, x_end, y_end, color);
  350. }
  351. #define STR_H 20
  352. #define STR_Y_S 36
  353. #define STR_FRAME_START_Y 8
  354. #define STR_X_S 4
  355. #define STR_X_E 123
  356. //
  357. void oled_draw_string_frame(uint8_t str_num)
  358. {
  359. for (int i = 0; i < 2; i++) {
  360. // нижняя
  361. GFX_DrawLine(STR_X_S, str_num*STR_H + STR_Y_S + i, STR_X_E, str_num*STR_H + STR_Y_S + i, 15);
  362. // верхняя
  363. GFX_DrawLine(STR_X_S, str_num*STR_H + STR_Y_S - STR_H + i, STR_X_E, str_num*STR_H + STR_Y_S - STR_H + i, 15);
  364. }
  365. // Правая
  366. GFX_DrawLine(STR_X_E, str_num*STR_H + STR_Y_S, STR_X_E, str_num*STR_H + STR_Y_S - STR_H, 15);
  367. // Левая
  368. GFX_DrawLine(STR_X_S, str_num*STR_H + STR_Y_S, STR_X_S, str_num*STR_H + STR_Y_S - STR_H, 15);
  369. }
  370. //
  371. void oled_single_frame(uint8_t num)
  372. {
  373. GFX_DrawRoundRectangle(0, 0, 127, MENU_STR_HEIGHT + 6, 3, 15);
  374. }
  375. //
  376. void oled_double_frame(uint8_t num)
  377. {
  378. GFX_DrawRoundRectangle(0, 0, 127, 2*MENU_STR_HEIGHT + 6 + 1, 3, 15);
  379. num++;
  380. uint8_t height = 2*MENU_STR_HEIGHT + 6;
  381. uint8_t offset = 2*num*MENU_STR_HEIGHT + 6 - 1;
  382. GFX_DrawRoundRectangle(0, offset, 127, height, 3, 15);
  383. }
  384. //
  385. void test_oled_old(void)
  386. {
  387. #if 0
  388. for (int i = 0; i < 16; i++) {
  389. SSD1327_DrawPixel(10, 20 + i, i);
  390. }
  391. SSD1327_DrawPixel(20, 20, 15);
  392. SSD1327_DrawPixel(30, 20, 15);
  393. SSD1327_DrawPixel(40, 20, 5);
  394. #endif
  395. //void GFX_DrawLine(int x_start, int y_start, int x_end, int y_end, uint8_t color);
  396. // Верхняя
  397. GFX_DrawLine(0, 0, 127, 0, 15);
  398. // Левая
  399. GFX_DrawLine(0, 0, 0, 127, 15);
  400. // Правая
  401. GFX_DrawLine(127, 0, 127, 127, 15);
  402. // Нижняя
  403. GFX_DrawLine(0, 127, 127, 127, 15);
  404. //GFX_SetFont(font_8x5);
  405. GFX_SetFontSize(1);
  406. GFX_DrawString(4, 10, (char*)"BbAa12345", 15, 0);
  407. GFX_SetFontSize(2);
  408. GFX_DrawString(4, 30, (char*)"BbAa12345", 15, 0);
  409. GFX_SetFontSize(3);
  410. GFX_DrawString(4, 60, (char*)"BbAa12345", 15, 0);
  411. oled_display();
  412. }
  413. //
  414. void test_oled(void)
  415. {
  416. //void Paint_DrawPoint(UWORD Xpoint, UWORD Ypoint, UWORD Color, DOT_PIXEL Dot_Pixel, DOT_STYLE Dot_FillWay);
  417. #if 1
  418. //OLED_1in5_B_Clear();
  419. Paint_NewImage(oled_buf, OLED_WIDTH, OLED_HEIGHT, 0, BLACK);
  420. Paint_SetScale(16);
  421. // 1.Select Image
  422. Paint_SelectImage(oled_buf);
  423. Paint_Clear(BLACK);
  424. while (1)
  425. {
  426. /*
  427. Paint_DrawPoint(20, 10, WHITE, DOT_PIXEL_1X1, DOT_STYLE_DFT);
  428. Paint_DrawPoint(30, 10, WHITE, DOT_PIXEL_2X2, DOT_STYLE_DFT);
  429. Paint_DrawPoint(40, 10, WHITE, DOT_PIXEL_3X3, DOT_STYLE_DFT);
  430. Paint_DrawLine(10, 10, 10, 20, WHITE, DOT_PIXEL_1X1, LINE_STYLE_SOLID);
  431. Paint_DrawLine(20, 20, 20, 30, WHITE, DOT_PIXEL_1X1, LINE_STYLE_SOLID);
  432. Paint_DrawLine(30, 30, 30, 40, WHITE, DOT_PIXEL_1X1, LINE_STYLE_DOTTED);
  433. Paint_DrawLine(40, 40, 40, 50, WHITE, DOT_PIXEL_1X1, LINE_STYLE_DOTTED);
  434. Paint_DrawCircle(60, 30, 15, WHITE, DOT_PIXEL_1X1, DRAW_FILL_EMPTY);
  435. Paint_DrawCircle(100, 40, 20, WHITE, DOT_PIXEL_1X1, DRAW_FILL_FULL);
  436. Paint_DrawRectangle(50, 30, 60, 40, WHITE, DOT_PIXEL_1X1, DRAW_FILL_EMPTY);
  437. Paint_DrawRectangle(90, 30, 110, 50, BLACK, DOT_PIXEL_1X1, DRAW_FILL_FULL);
  438. oled_display();
  439. osDelay(2000);
  440. //Paint_Clear(BLACK);
  441. oled_clear(BLACK);
  442. oled_display();
  443. osDelay(2000);
  444. */
  445. #if 0
  446. Paint_DrawString_EN(10, 0, "waveshare", &Font16, 0x1, 0xb);
  447. Paint_DrawString_EN(10, 17, "hello world", &Font8, 0x2, 0xc);
  448. Paint_DrawNum(10, 30, 123.456789, &Font8, 4, 0x3, 0xd);
  449. Paint_DrawNum(10, 43, 987654, &Font12, 5, 0x4, 0xe);
  450. #endif
  451. Paint_DrawString_EN(10, 0, "waveshare", &Font16, 0xf, 0x0);
  452. Paint_DrawString_EN(10, 17, "hello world", &Font8, 0xf, 0x0);
  453. Paint_DrawNum(10, 30, 123.456789, &Font8, 4, 0xf, 0x0);
  454. Paint_DrawNum(10, 43, 987654, &Font12, 5, 0xf, 0x0);
  455. Paint_DrawString_EN(10, 60, "hello world", &Font8, 0xf, 0x0);
  456. // ----------------------------------------------------------------------- //
  457. // Другая либа
  458. //font_8x13
  459. GFX_SetFont(font_8x5);
  460. GFX_SetFontSize(1);
  461. GFX_DrawString(8, 80, (char*)"12345", 15, 0);
  462. GFX_SetFont(font_8x13);
  463. GFX_SetFontSize(1);
  464. GFX_DrawString(8, 100, (char*)"12345", 15, 0);
  465. //void GFX_DrawRoundRectangle(int x, int y, uint16_t w, uint16_t h, uint16_t r, uint8_t color)
  466. // Скругленная рамка и логотип
  467. GFX_DrawRoundRectangle(0, 0, 127, 127, 5, 15);
  468. Paint_DrawString_EN(45, 120, "Fly Electronics", &Font8, 0xf, 0x0);
  469. oled_display();
  470. }
  471. //Paint_DrawPoint(40, 40, WHITE, DOT_PIXEL_8X8, DOT_FILL_AROUND);
  472. //void Paint_DrawLine(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend,
  473. // UWORD Color, DOT_PIXEL Line_width, LINE_STYLE Line_Style)
  474. Paint_DrawLine(10, 10, 10, 20, WHITE, DOT_PIXEL_1X1, LINE_STYLE_SOLID);
  475. Paint_DrawString_EN(10, 17, "hello world", &Font8, 0x2, 0xc);
  476. #endif
  477. #if 0
  478. GFX_SetFont(Font8_Table);
  479. GFX_SetFontSize(1);
  480. //GFX_SetFont(font_8x13);
  481. ///GFX_SetFontSize(1);
  482. GFX_DrawString(8, 20, (char*)"Hellow world", 15, 0);
  483. #endif
  484. oled_display();
  485. }