{"id":306814,"date":"2020-07-12T21:00:35","date_gmt":"2020-07-12T21:00:35","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=306814"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-07-12T21:00:35","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=306814","title":{"rendered":"\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 LVGL \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/510626\/\"><a href=\"https:\/\/lvgl.io\/\" rel=\"nofollow\">LVGL<\/a> \u2014 Light and Versatile Graphics Library \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043a\u0430\u043a LittleVGL.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jm\/ls\/ca\/jmlscartj3iiy7yndceei8jkluw.png\"><\/div>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a STM32, ESP32 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435. \u041c\u043d\u0435 \u043f\u043e\u043a\u0430 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0443\u044e \u0434\u0435\u043c\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 ESP32 \u0438 STM32f429 Discovery. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 Dark and Light \u0442\u0435\u043c\u0430\u043c\u0438. \u0420\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 MIT license. \u041c\u043e\u0436\u043d\u043e \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u0436\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u0445. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435 <a href=\"https:\/\/lvgl.io\/demos\" rel=\"nofollow\">Online Demo<\/a> \u0431\u0435\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0438\u0441\u043f\u043b\u0435\u044f.<\/p>\n<ol>\n<li>\u041d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 RGB \u0433\u0434\u0435 \u0431\u0443\u0444\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 MCU \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 RAM \u0438\u043b\u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 SDRAM<\/li>\n<li>\u0427\u0435\u0440\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0434\u0438\u0441\u043f\u043b\u0435\u044f. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 MCU \u043c\u043e\u0436\u0435\u0442 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u0447\u0435\u0440\u0435\u0437 SPI \u0438\u043b\u0438 I2C \u0448\u0438\u043d\u0443. \u0414\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0431\u0443\u0444\u0435\u0440\u044b \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 MCU \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435<\/li>\n<\/ol>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Two typical hardware set-ups<\/b>                         <\/p>\n<div class=\"spoiler_text\">MCU with TFT\/LCD driver If your MCU has a TFT\/LCD driver periphery then you can connect a display directly via RGB interface. In this case, the frame buffer can be in the internal RAM (if the MCU has enough RAM) or in the external RAM (if the MCU has a memory interface).<\/p>\n<p>  External display controller If the MCU doesn&#8217;t have TFT\/LCD driver interface then an external display controller (E.g. SSD1963, SSD1306, ILI9341) has to be used. In this case, the MCU can communicate with the display controller via Parallel port, SPI or sometimes I2C. The frame buffer is usually located in the display controller which saves a lot of RAM for the MCU.  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xt\/n1\/-w\/xtn1-w8dqla-q-shy8mkiyauvd4.png\"><\/div>\n<p>  \u0412\u0441\u0435 \u043e\u0447\u0435\u043d\u044c \u0433\u0438\u0431\u043a\u043e \u0432 \u044d\u0442\u043e\u043c \u043f\u043b\u0430\u043d\u0435. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0430\u043c\u0438 \u043b\u0435\u0433\u043a\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<p>  \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u043d\u043e \u0438 \u0441\u0430\u043c\u044b\u0439 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c callback \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u2014 my_flush_cb<\/p>\n<pre><code class=\"cpp\">void my_flush_cb(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p) {     \/*The most simple case (but also the slowest) to put all pixels to the screen one-by-one*\/     int32_t x, y;     for(y = area-&gt;y1; y &lt;= area-&gt;y2; y++) {         for(x = area-&gt;x1; x &lt;= area-&gt;x2; x++) {             put_px(x, y, *color_p)             color_p++;         }     }      \/* IMPORTANT!!!      * Inform the graphics library that you are ready with the flushing*\/     lv_disp_flush_ready(disp); }<\/code><\/pre>\n<p>  put_px \u2014 \u042d\u0442\u043e \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430. \u0418\u0437 \u0437\u0430 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u0438\u0434\u0435\u0442 \u043f\u043e\u043f\u0438\u043a\u0441\u0435\u043b\u044c\u043d\u043e \u044d\u0442\u043e \u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e. \u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0434\u0440\u0443\u0433\u0438\u0435 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438<\/p>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u043f\u043e\u0434 \u0432\u0430\u0448 \u0434\u0438\u0441\u043f\u043b\u0435\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043f\u043e\u0440\u0442 LVGL \u0438 \u0432\u0430\u043c \u043d\u0430\u0434\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432\u0432\u043e\u0434\u0430 \u0432\u044b\u0432\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cpp\">    lv_init();    tft_init();    touchpad_init();     lv_demo_widgets();  \/\/ \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0437 \u0434\u0435\u043c\u043e <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0431\u044f \u0438\u043c\u0435\u0435\u0442 \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 \u0437\u0430\u0434\u0430\u0447. \u0414\u0430 \u044d\u0442\u043e \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043e\u0442\u043e\u043a\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043f\u043e\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u043c\u0435\u043d\u044f \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a, \u0442\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0430 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0430 lv_tick_inc<\/p>\n<pre><code class=\"cpp\">void * tick_thread (void *args) {       while(1) {         usleep(5*1000);   \/*Sleep for 5 millisecond*\/         lv_tick_inc(5);      \/*Tell LVGL that 5 milliseconds were elapsed*\/     } }<\/code><\/pre>\n<p>  \u041f\u0440\u0438\u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430\u0434\u043e \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0448\u043b\u0438 \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0435\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0432\u0440\u0435\u043c\u044f \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0430 \u043b\u0438\u0448\u043d\u0438\u0439 \u043f\u043e\u0442\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044e \u043e\u0442 \u0442\u0430\u0439\u043c\u0435\u0440\u0430. \u041a\u0430\u043a \u0440\u0430\u0437 \u0432 STM32 \u0435\u0441\u0442\u044c SysTick \u0442\u0430\u0439\u043c\u0435\u0440 \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0446\u0435\u043b\u0435\u0439:<\/p>\n<pre><code class=\"cpp\"> void systickInit (uint16_t frequency) {    RCC_ClocksTypeDef RCC_Clocks;    RCC_GetClocksFreq (&amp;RCC_Clocks);    (void) SysTick_Config (RCC_Clocks.HCLK_Frequency \/ frequency); }  extern &quot;C&quot; void SysTick_Handler (void)  {       lv_tick_inc(1);    \/\/ 1 ms  } <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">SysTick timer<\/b>                         <\/p>\n<div class=\"spoiler_text\">This timer is dedicated to real-time operating systems, but could also be used as a standard<br \/>  downcounter. It features:<\/p>\n<ul>\n<li>A 24-bit downcounter<\/li>\n<li>Autoreload capability<\/li>\n<li>Maskable system interrupt generation when the counter reaches 0<\/li>\n<li>Programmable clock source.<\/li>\n<\/ul>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u043d\u0430\u0434\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u0446\u0438\u043a\u043b\u0435 lv_task_handler. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0434\u0435\u0440\u0433\u0430\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u0436\u0434\u044b\u0435 5 ms \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u043e\u0442\u043a\u043b\u0438\u043a\u0430. \u042f \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0434\u043e 20 ms \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u0441\u0435 \u0435\u0449\u0435 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0430\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0442\u0437\u044b\u0432\u0447\u0438\u0432\u043e\u0439 \u0438 \u043f\u043b\u0430\u0432\u043d\u043e\u0439. \u041c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u0432\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Thread<\/p>\n<pre><code class=\"cpp\">while(1) {   lv_task_handler();   my_delay_ms(5); } <\/code><\/pre>\n<p>  \u0426\u0438\u043a\u043b\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445. \u042f \u0441\u0434\u0435\u043b\u0430\u043b \u043e\u0448\u0438\u0431\u043a\u0443 \u0438 \u0437\u0430\u043f\u0438\u0445\u043d\u0443\u043b \u043e\u0431\u0435 \u0432 \u043e\u0434\u0438\u043d \u0446\u0438\u043a\u043b. \u0412\u043e\u0442 \u0447\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u2014 <a href=\"https:\/\/youtu.be\/KRr4xy87Pr4\" rel=\"nofollow\">\u0422\u043e\u0440\u043c\u043e\u0437\u0430<\/a><\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043e\u0431\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u043d\u0435\u0441\u0435\u043d\u044b \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430\u043c\u0438 \u0432\u0441\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e:<\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/aMWQuoekEKE?rel=0&amp;showinfo=1&amp;hl=en-US\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\" allow=\"encrypted-media; accelerometer; gyroscope; picture-in-picture\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0431\u0443\u0444\u0435\u0440\u043e\u0432:<\/p>\n<ol>\n<li>\u041e\u0434\u0438\u043d \u0431\u0443\u0444\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 LVGL \u0440\u0438\u0441\u0443\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u044d\u043a\u0440\u0430\u043d\u0430 \u0432 \u0431\u0443\u0444\u0435\u0440 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439<\/li>\n<li>\u0414\u0432\u0430 \u0431\u0443\u0444\u0435\u0440\u0430 \u0441 \u043d\u0435\u043f\u043e\u043b\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0430, \u043f\u043e\u043a\u0430 \u0438\u0434\u0435\u0442 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u0432 \u043e\u0434\u043d\u043e\u043c \u0431\u0443\u0444\u0435\u0440\u0435, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435<\/li>\n<li>\u0414\u0432\u0430 \u0431\u0443\u0444\u0435\u0440\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0441 \u0446\u0435\u043b\u044b\u0439 \u044d\u043a\u0440\u0430\u043d<\/li>\n<\/ol>\n<p>  \u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0435\u0441\u0442\u044c <a href=\"https:\/\/lvgl.io\/tools\/fontconverter\" rel=\"nofollow\">\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440 \u0434\u043b\u044f \u0448\u0440\u0438\u0444\u0442\u043e\u0432<\/a> \u0438 <a href=\"https:\/\/lvgl.io\/tools\/imageconverter\" rel=\"nofollow\">\u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a<\/a>. \u041c\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0448\u0440\u0438\u0444\u0442 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u043b\u0438 \u0441\u0432\u043e\u044e \u0438\u043a\u043e\u043d\u043a\u0443 \u0432 \u043c\u0435\u043d\u044e. \u041f\u0440\u0438\u0447\u0435\u043c \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 CD-CARD \u0438\u043b\u0438 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0431\u0430\u0439\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 Flash \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">How to use the generated file in LittlevGL?<\/b>                         <\/p>\n<div class=\"spoiler_text\">For C arrays<br \/>   Copy the result C file into your LittlevGL project<br \/>   In a C file of your application declare the image as: LV_IMG_DECLARE(my_image_name);<br \/>   Set the image for an lv_img object: lv_img_set_src(img1, &amp;my_image_name);<br \/>  For external binary files (e.g. SD card)<br \/>   Set up a new driver. To learn more read the Tutorial.<br \/>   Set the image for an lv_img object: lv_img_set_src(img1, \u00abS:\/path\/to\/image\u00bb);  <\/div>\n<\/p><\/div>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u0432\u0430\u0436\u043d\u0430\u044f \u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f \u043f\u043b\u044e\u0448\u043a\u0430 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0447\u0442\u043e \u0434\u043b\u044f \u0435\u0435 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Eclipse IDE \u0432 \u0441\u0440\u0435\u0434\u0435 Linux \u0438 Windows.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sg\/6o\/sg\/sg6osg04ntewolvrszlgy6vc5ae.png\"><\/p>\n<p>  \u041f\u0440\u0438\u044f\u0442\u043d\u043e \u0447\u0442\u043e, \u0434\u043b\u044f OpenSource \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043e\u043d\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430. \u0418\u043c\u0435\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438 \u043f\u043e\u0440\u0442\u043e\u0432. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0431\u0440\u043e\u0441\u043b\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c <a href=\"https:\/\/forum.lvgl.io\/\" rel=\"nofollow\">\u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 <\/a>.<\/p>\n<p>  \u042f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b \u043f\u043e\u0440\u0442 \u0434\u043b\u044f ESP32. \u0414\u0430\u0436\u0435 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 mapping \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u043e\u0432 SPI \u0442.\u0435. \u043d\u0435 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043b\u0443\u0447\u0448\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438, \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0431\u0435\u0437 \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u0439:<\/p>\n<p>  <a href=\"https:\/\/youtu.be\/15qrV2CNSoQ\" rel=\"nofollow\">ESP32 ST7789 LVGL<\/a><br \/>  <a href=\"https:\/\/youtu.be\/yOIVdAknToc\" rel=\"nofollow\">ESP32 ILI9341 LVGL<\/a><\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u043f\u043e \u0442\u0435\u043c\u0435<\/b>                         <\/p>\n<div class=\"spoiler_text\"><a href=\"https:\/\/docs.lvgl.io\/latest\/en\/html\/porting\/sys.html\" rel=\"nofollow\">docs.lvgl.io\/latest\/en\/html\/porting\/sys.html<\/a><br \/>  <a href=\"http:\/\/www.micromouseonline.com\/2016\/02\/02\/systick-configuration-made-easy-on-the-stm32\/\" rel=\"nofollow\">Basic systick configuration on the STM32<\/a>  <\/div>\n<\/p><\/div>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/510626\/\"> https:\/\/habr.com\/ru\/post\/510626\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/510626\/\"><a href=\"https:\/\/lvgl.io\/\" rel=\"nofollow\">LVGL<\/a> \u2014 Light and Versatile Graphics Library \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043a\u0430\u043a LittleVGL.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jm\/ls\/ca\/jmlscartj3iiy7yndceei8jkluw.png\"><\/div>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a STM32, ESP32 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435. \u041c\u043d\u0435 \u043f\u043e\u043a\u0430 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0443\u044e \u0434\u0435\u043c\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 ESP32 \u0438 STM32f429 Discovery. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 Dark and Light \u0442\u0435\u043c\u0430\u043c\u0438. \u0420\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 MIT license. \u041c\u043e\u0436\u043d\u043e \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u0436\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u0445. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435 <a href=\"https:\/\/lvgl.io\/demos\" rel=\"nofollow\">Online Demo<\/a> \u0431\u0435\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-306814","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/306814","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=306814"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/306814\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=306814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=306814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=306814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}