{"id":308886,"date":"2020-08-23T15:00:32","date_gmt":"2020-08-23T15:00:32","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=308886"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=308886","title":{"rendered":"\u0412\u044b\u0432\u043e\u0434 \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430 OLED \u0434\u0438\u0441\u043f\u043b\u0435\u0439 \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c SH1106 \u043f\u043e \u0448\u0438\u043d\u0435 SPI \u0447\u0435\u0440\u0435\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 HAL"},"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\/516260\/\">\n<p>\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438. \u0412 \u0441\u0432\u043e\u0438\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430\u0445 \u043d\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445 STM32, \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u044f \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c OLED \u0434\u0438\u0441\u043f\u043b\u0435\u044f\u043c\u0438 \u043d\u0430 \u0447\u0438\u043f\u0435 SSD1306. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438\u0448\u0435\u043b \u043a\u043e \u043c\u043d\u0435 1,3&quot; SPI \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e \u0434\u0435\u043c\u043e\u043a\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0439 \u0446\u0435\u043d\u0435 \u2014 \u043e\u043a\u043e\u043b\u043e 200\u0440\u0443\u0431. \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0431\u0440\u043e\u0441\u0438\u043b\u043e\u0441\u044c \u0432 \u0433\u043b\u0430\u0437\u0430 \u2014 \u043d\u0430\u0434\u043f\u0438\u0441\u044c SH1106 \u0432\u043c\u0435\u0441\u0442\u043e SSD1306, \u043f\u043e\u0438\u0441\u043a \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043f\u0440\u043e\u044f\u0441\u043d\u0438\u043b, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438, \u0434\u0430 \u0438 \u0442\u043e\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439. \u041a\u0430\u043a \u0441 \u043d\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u044f \u0438 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0432\u0430\u043c \u0432 \u044d\u0442\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p> \u0413\u0434\u0435-\u0442\u043e \u0441 \u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434 \u043c\u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0438\u043d\u0435\u0439 \u043f\u0438\u043b\u044e\u043b\u0438 (STM32F103) \u0438 \u0431\u044b\u043b\u0430 \u0437\u0430\u043a\u0430\u0437\u0430\u043d\u0430 \u043a\u0438\u0442\u0430\u0439\u0441\u043a\u0430\u044f \u043f\u043b\u0430\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 STM32F407VE. \u0414\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u0447\u0430\u0441\u0442\u043e, \u0434\u0432\u0443\u0445 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e OLED SSD1306 \u043f\u043e \u0448\u0438\u043d\u0435 I2C, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043b\u044e\u0431\u0438\u043b\u0441\u044f \u0435\u0449\u0435 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d Arduino. \u0422\u0430\u043a \u043a\u0430\u043a \u0433\u0440\u0430\u0444\u0438\u043a\u0443 \u044f \u043d\u0430 \u043d\u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0432\u043e\u0436\u0443, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0447\u0438\u0441\u043b\u0430 \u0438 \u0442\u0435\u043a\u0441\u0442, \u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043f\u043e\u0440\u0430\u0436\u0430\u043b \u043c\u043e\u0435 \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u043e\u0434 SH1106 \u0438 \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0435\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f. \u0414\u0438\u0441\u043f\u043b\u0435\u0439 \u043f\u0440\u0438\u0435\u0445\u0430\u043b 7pin SPI:<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xz\/1j\/0j\/xz1j0jgzfl0h_bjfgc4xar2w5do.jpeg\" width=\"25%\" alt=\"sh1106\" \/><\/div>\n<p>  <\/p>\n<p>\u041f\u043b\u0430\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0443 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u0430\u044f, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u043c\u0435\u0448\u0430\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a \u0434\u0440\u0443\u0433\u043e\u0439, \u0445\u043e\u0442\u044c \u043d\u0430 STM3F103, \u0434\u043b\u044f \u0447\u0435\u0433\u043e HAL \u0438 \u0431\u044b\u043b \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d (\u0440\u0430\u0437\u0432\u0435 \u043d\u0435 \u0442\u0430\u043a ?):<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0d\/uy\/95\/0duy95uya1v_frcw1hrpmnu10xw.jpeg\" width=\"250\" alt=\"F407board\" \/><\/div>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<p>\u0412\u044b\u0431\u0435\u0440\u0435\u043c \u0432 CubeMX \u043d\u0430\u0448 STM32F407VE \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u0440\u0435\u0436\u0438\u043c \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u0438\u043d\u0430\u0447\u0435 \u043f\u043e\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 UART1. \u0412 Clock Configuration \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u0440\u0435\u0437\u043e\u043d\u0430\u0442\u043e\u0440\u044b 8MHz \u0438 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0430 168MHz \u043e\u0442 HSE. \u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 \u043d\u043e\u0436\u043a\u0438 PA6 \u0438 PA7, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b D2 \u0438 D3 (\u0437\u0430\u0433\u043e\u0440\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0434\u0430\u0447\u0435\u0439 \u043b\u043e\u0433 \u00ab0\u00bb) \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u043a\u043e\u0434\u0430:<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/9m\/pa\/el\/9mpaeltjmh5tchovnsovxeybukc.png\" width=\"100%\" alt=\"RccDebug\" \/><\/div>\n<p>  <\/p>\n<p>\u041d\u0430 \u043f\u043b\u0430\u0442\u0435 SPI1 \u0432\u044b\u0432\u0435\u0434\u0435\u043d \u043d\u0430 \u043a\u043e\u043b\u043e\u0434\u043a\u0443 NRF24L01 \u0438 \u043a \u043d\u0435\u043c\u0443 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d ESP-PSRAM64H, \u0434\u043b\u044f \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u043e\u0441\u0442\u0430\u043b\u0441\u044f SPI3. \u0412\u044b\u0431\u0435\u0440\u0435\u043c \u0435\u0433\u043e \u043c\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u043d\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0432 DMA \u0440\u0435\u0436\u0438\u043c\u0435 \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0442\u0430\u043a\u0438\u0435 :<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yh\/de\/2q\/yhde2qgrzjehrv3ek2nvzrh42c4.png\" width=\"100%\" alt=\"SpiAll\" \/><\/div>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u043e\u0436\u043a\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 <b>DC<\/b> (\u0434\u0430\u043d\u043d\u044b\u0435\/\u043a\u043e\u043c\u0430\u043d\u0434\u0430), <b>RESET<\/b> (\u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0439 \u0441\u0431\u0440\u043e\u0441) \u0438 <b>CS<\/b> (\u0432\u044b\u0431\u043e\u0440 \u0434\u0438\u0441\u043f\u043b\u0435\u044f) :<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jw\/0g\/c7\/jw0gc7jydpvl0qglakdvsdg7p8y.png\" width=\"100%\" alt=\"Gpio\" \/><\/div>\n<p>  <\/p>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 :<\/p>\n<p>  <b>SH1106 \u2014 STM32F407<\/b>  <\/p>\n<ol>\n<li>GND \u2014 GND<\/li>\n<li>VDD \u2014 3V3<\/li>\n<li>SCK \u2014 PC10<\/li>\n<li>SDA \u2014 PC12<\/li>\n<li>RES \u2014 PD0<\/li>\n<li>DC \u2014 PC11<\/li>\n<li>CS \u2014 PA15<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0423\u0432\u0435\u043b\u0438\u0447\u0438\u043c Heap \u0438 Stack \u0432 2 \u0440\u0430\u0437\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043b\u044f Atollic, \u0438 \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a. \u0421\u0440\u0430\u0437\u0443 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043a \u0441\u0432\u043e\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c. \u0412 \u043b\u0435\u0432\u043e\u043c \u043e\u043a\u043d\u0435 \u0440\u0430\u0441\u043a\u0440\u043e\u0435\u043c \u043f\u0430\u043f\u043a\u0443 Src \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0432 \u043c\u0435\u043d\u044e \u0432\u044b\u0431\u0435\u0440\u0435\u043c File-&gt;Source File, \u0432\u0432\u0435\u0434\u0435\u043c \u0438\u043c\u044f \u043d\u0430\u0448\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 spi1106.c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c File-&gt;Header File \u0441 \u0438\u043c\u0435\u043d\u0435\u043c spi1106.h. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043c \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 Src \u0432 Inc \u0438 \u043e\u0442\u043a\u0440\u043e\u0435\u043c \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043c\u0435\u0436\u0434\u0443 #define ic1306_H_ \u0438 #endif \/* ic1306_H_ *\/ \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u0430\u043c\u0438 <b>CD<\/b>, <b>RESET<\/b> \u0438 <b>CS<\/b> \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u043a\u0440\u0430\u043d\u0430: <\/p>\n<pre><code class=\"cpp\">#define SPI1106_H_ #include &quot;main.h&quot; void sh1106Init (uint8_t contrast, uint8_t bright, uint8_t mirror); #define SH_Command HAL_GPIO_WritePin(DC_GPIO_Port, DC_Pin, GPIO_PIN_RESET) #define SH_Data HAL_GPIO_WritePin(DC_GPIO_Port, DC_Pin, GPIO_PIN_SET) #define SH_ResHi HAL_GPIO_WritePin(RES_GPIO_Port, RES_Pin, GPIO_PIN_SET) #define SH_ResLo HAL_GPIO_WritePin(RES_GPIO_Port, RES_Pin, GPIO_PIN_RESET) #define SH_CsHi HAL_GPIO_WritePin(GPIOA, CS_Pin, GPIO_PIN_SET) #define SH_CsLo HAL_GPIO_WritePin(GPIOA, CS_Pin, GPIO_PIN_RESET) #endif \/* SPI1106_H_ *\/<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 <strong>spi1106.c<\/strong> \u043d\u0430\u0447\u043d\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c <strong>main.h<\/strong>, \u0445\u044d\u0434\u0435\u0440 \u043d\u0430\u0448\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u0430\u043d\u0430\u043b\u0430 SPI \u0434\u0438\u0441\u043f\u043b\u0435\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">#include &quot;main.h&quot; #include &lt;spi1106.h&gt; extern SPI_HandleTypeDef hspi3;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0438 \u043a\u043e\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0447\u0435\u0440\u0435\u0437 SPI \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 HAL:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void SH1106_WC (uint8_t comm) { uint8_t temp[1]; SH_Command; SH_CsLo; temp[0]=comm; HAL_SPI_Transmit(&hspi3,&temp,1,1); SH_CsHi; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u043a\u043e\u043c\u0430\u043d\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void sh1106Init (uint8_t contrast, uint8_t bright,uint8_t mirror) { SH_ResLo; HAL_Delay(1); SH_ResHi; HAL_Delay(1); SH1106_WC(0xAE); \/\/display off SH1106_WC(0xA8); \/\/--set multiplex ratio(1 to 64) SH1106_WC(0x3F); \/\/ SH1106_WC(0x81); \/\/--set contrast control register SH1106_WC(contrast); if (mirror) {SH1106_WC(0xA0); SH1106_WC(0xC0);} else {SH1106_WC(0xA1); SH1106_WC(0xC8); } SH1106_WC(0xDA); SH1106_WC(0x12); SH1106_WC(0xD3); SH1106_WC(0x00); SH1106_WC(0x40); SH1106_WC(0xD9); \/\/--set pre-charge period SH1106_WC(bright); SH1106_WC(0xAF); \/\/--turn on SSD1306 panel }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421 \u043d\u0435\u0439, \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0432\u0441\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u2014 \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u044c (<b>0-255<\/b>), \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u044f\u0440\u043a\u043e\u0441\u0442\u044c (\u0440\u0430\u0437\u0431\u0438\u0442\u0430 \u043d\u0430 \u0434\u0432\u0430 \u043f\u043e\u043b\u0443\u0431\u0430\u0439\u0442\u0430, \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 <b>0xX0<\/b> <b>0x0X<\/b> \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b), \u0442\u0440\u0435\u0442\u0438\u0439 \u2014 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u0438\u0441\u043f\u043b\u0435\u044f (<b>0\/1<\/b>). \u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u043d\u0430 \u0414\u0430\u0442\u0430\u0433\u043e\u0440\u0435 \u00ab\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430. \u0427\u0430\u0441\u0442\u044c 1. OLED \u0434\u0438\u0441\u043f\u043b\u0435\u0439 0.96\u00bb (128\u044564) \u043d\u0430 SSD1306&quot; \u0438 \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 <a href=\"http:\/\/microsin.net\/adminstuff\/hardware\/ssd1306-oled-controller.html\">\u0440\u0443\u0441\u0441\u043a\u0438\u0439<\/a> \u0434\u0430\u0442\u0430\u0448\u0438\u0442 SSD1306.<\/p>\n<p>  <\/p>\n<p> \u0414\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u0432 <b>main.c<\/b> \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0438\u0441\u043f\u043b\u0435\u044f :<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">\/* USER CODE BEGIN 2 *\/ sh1106Init (40,0x22,0); \/* USER CODE END 2 *\/<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0443\u0437\u043e\u0440\u044b \u0442\u0438\u043f\u0430 \u0442\u0430\u043a\u0438\u0445 :<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gx\/j6\/ry\/gxj6ry_3gsly4_zwn3-vnyiweam.jpeg\" width=\"30%\" alt=\"noise\" \/><\/div>\n<p>  <\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 <b>spi1106.h<\/b> \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0440\u0430\u0437\u0443 \u0435\u0449\u0435 \u0442\u0440\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u2014 \u043e\u0447\u0438\u0441\u0442\u043a\u0438, \u043f\u0435\u0447\u0430\u0442\u0438 \u043c\u0435\u043b\u043a\u0438\u043c \u0438 \u0441\u0440\u0435\u0434\u043d\u0438\u043c \u0448\u0440\u0438\u0444\u0442\u043e\u043c :<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void sh1106Clear(uint8_t start, uint8_t stop); void sh1106SmallPrint(uint8_t posx, uint8_t posy, uint8_t *str); void sh1106MediumPrint(uint8_t posx, uint8_t posy,uint8_t *str);<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435<b> spi1106.c<\/b> \u0432\u044b\u0431\u043e\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 0-\u043e\u0439 \u043f\u043e 7-\u044e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <b>0xB0&#8230;0xB7<\/b> \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a :<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void sh1106Clear(uint8_t start, uint8_t stop) { uint32_t *adrclear; uint32_t timep,timec; uint8_t dt[128]; adrclear=(uint32_t *)dt; for(uint8_t i=0;i&lt;32;i++) {*adrclear++=0x00;} for (uint8_t m = start; m &lt;= stop; m++) { SH1106_WC(0xB0+m); SH1106_WC(2); SH1106_WC(0x10); SH_Data; SH_CsLo; HAL_SPI_Transmit_DMA(&hspi3,dt,128); timec=HAL_GetTick(); timep=timec+50; while ((HAL_SPI_GetState(&hspi3) != HAL_SPI_STATE_READY)&&(timec&lt;timep)) {timec=HAL_GetTick();} SH_CsHi; } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u0432 <b>main.c<\/b>, \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u043e\u0447\u0438\u0441\u0442\u043a\u0443 :<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">sh1106Clear(0,7);<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043e\u0447\u0438\u0441\u0442\u043a\u043e\u0439, \u0437\u0430\u0434\u0430\u0432 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0438\u043c \u0443\u0437\u043e\u0440\u043e\u043c, \u043c\u044b \u0436\u0435 \u0434\u0432\u0438\u0433\u0430\u0435\u043c \u0434\u0430\u043b\u0435\u0435, \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u0432 \u0444\u0430\u0439\u043b <b>spi1106.c<\/b> \u0431\u043b\u0438\u0436\u0435 \u043a \u043d\u0430\u0447\u0430\u043b\u0443 \u0441\u043f\u0435\u0440\u0432\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0448\u0440\u0438\u0444\u0442 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 <b>DefaultFonts.c<\/b> (\u0432\u0437\u044f\u043b \u0438\u0437 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0430\u0440\u0434\u0443\u0438\u043d\u043e\u0432\u0441\u043a\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438). \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0448\u0440\u0438\u0444\u0442\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u0442\u043e \u0447\u0442\u043e \u043e\u043d \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d (\u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u043e\u0434 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0431\u0430\u0439\u0442\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u044f\u043c\u0438 SSD1306\/SH1106). \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c 4-\u0435 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0445 \u0431\u0430\u0439\u0442\u0430. \u0412\u0435\u0441\u044c \u0444\u043e\u043d\u0442 \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0432 <a href=\"https:\/\/yadi.sk\/d\/b1XRW42ezorjxg\">\u0430\u0440\u0445\u0438\u0432\u0435<\/a> \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043b\u0438\u0448\u044c \u043d\u0430\u0447\u0430\u043b\u043e:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">SmallFont<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">const uint8_t SmallFont[] =  \/\/  \u0428\u0440\u0438\u0444\u0442  SmallFont { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \/\/\t001)\t0x20=032\t\u043f\u0440\u043e\u0431\u0435\u043b 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, \/\/\t002)\t0x21=033\t! 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, \/\/\t003)\t0x22=034\t&quot; 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14, \/\/\t004)\t0x23=035\t# 0x00, 0x24, 0x2A, 0x7F, 0x2A, 0x12, \/\/\t005)\t0x24=036\t$ 0x00, 0x23, 0x13, 0x08, 0x64, 0x62, \/\/\t006)\t0x25=037\t% 0x00, 0x36, 0x49, 0x55, 0x22, 0x50, \/\/\t007)\t0x26=038\t& 0x00, 0x00, 0x05, 0x03, 0x00, 0x00, \/\/\t008)\t0x27=039\t' 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, \/\/\t009)\t0x28=040\t( 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, \/\/\t010)\t0x29=041\t) 0x00, 0x14, 0x08, 0x3E, 0x08, 0x14, \/\/\t011)\t0x2A=042\t* 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, \/\/\t012)\t0x2B=043\t+ 0x00, 0x00, 0x00, 0xA0, 0x60, 0x00, \/\/\t013)\t0x2C=044\t, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, \/\/\t014)\t0x2D=045- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, \/\/\t015)\t0x2E=046\t. 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, \/\/\t016)\t0x2F=047\t\/ \/\/ 0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E, \/\/\t017)\t0x30=048\t0 0x00, 0x00, 0x42, 0x7F, 0x40, 0x00, \/\/\t018)\t0x31=049\t1 0x00, 0x42, 0x61, 0x51, 0x49, 0x46, \/\/\t019)\t0x32=050\t2 0x00, 0x21, 0x41, 0x45, 0x4B, 0x31, \/\/\t020)\t0x33=051\t3 0x00, 0x18, 0x14, 0x12, 0x7F, 0x10, \/\/\t021)\t0x34=052\t4 0x00, 0x27, 0x45, 0x45, 0x45, 0x39, \/\/\t022)\t0x35=053\t5 0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30, \/\/\t023)\t0x36=054\t6 0x00, 0x01, 0x71, 0x09, 0x05, 0x03, \/\/\t024)\t0x37=055\t7 0x00, 0x36, 0x49, 0x49, 0x49, 0x36, \/\/\t025)\t0x38=056\t8 0x00, 0x06, 0x49, 0x49, 0x29, 0x1E, \/\/\t026)\t0x39=057\t9 0x00, 0x00, 0x36, 0x36, 0x00, 0x00, \/\/\t027)\t0x3A=058\t: 0x00, 0x00, 0x56, 0x36, 0x00, 0x00, \/\/\t028)\t0x3B=059\t; 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, \/\/\t029)\t0x3C=060\t&lt; 0x00, 0x14, 0x14, 0x14, 0x14, 0x14, \/\/\t030)\t0x3D=061 = 0x00, 0x00, 0x41, 0x22, 0x14, 0x08, \/\/\t031)\t0x3E=062\t&gt; 0x00, 0x02, 0x01, 0x51, 0x09, 0x06, \/\/\t032)\t0x3F=063\t? \/\/ 0x00, 0x32, 0x49, 0x59, 0x51, 0x3E, \/\/\t033)\t0x40=064\t@ 0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C, \/\/\t034)\t0x41=065\tA 0x00, 0x7F, 0x49, 0x49, 0x49, 0x36, \/\/\t035)\t0x42=066\tB \/\/ ... }<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<p> \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0435\u0447\u0430\u0442\u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c \u0448\u0440\u0438\u0444\u0442\u043e\u043c \u0432\u044b\u0441\u043e\u0442\u043e\u0439 \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 (\u0448\u0438\u0440\u0438\u043d\u0430 6, \u0432\u044b\u0441\u043e\u0442\u0430 8 \u0442\u043e\u0447\u0435\u043a), \u0433\u0434\u0435 <b>posx<\/b> \u0437\u043d\u0430\u043a\u043e\u043c\u0435\u0441\u0442\u043e, \u043a\u0440\u0430\u0442\u043d\u043e\u0435 6 \u043f\u0438\u043a\u0441\u0435\u043b\u044f\u043c \u0434\u0438\u0441\u043f\u043b\u0435\u044f, \u0430 <b>posy<\/b> \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b (0 \u2014 \u0432\u0435\u0440\u0445\u043d\u044f\u044f, 7 \u2014 \u043d\u0438\u0436\u043d\u044f\u044f):<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void sh1106SmallPrint(uint8_t posx, uint8_t posy, uint8_t *str) { uint8_t dt[128]; uint16_t posfont, posscr; uint32_t *adrclr; uint16_t *adrdst,*adrsrc; uint32_t timer,timec; adrclr=(uint32_t *)&dt; uint8_t code; code=*str++; for(uint8_t i=0;i&lt;32;i++) { *adrclr++=0; } posscr=posx*6; while (code&gt;31) { if(code==32) {posscr+=2;} else {posfont=6*(code-32); adrdst=(uint16_t *)&dt[posscr]; adrsrc=(uint16_t *)&SmallFont[posfont]; *(adrdst++)=*(adrsrc++); *(adrdst++)=*(adrsrc++); *(adrdst++)=*(adrsrc++); posscr+=6; } code=*str++; if (posscr&gt;122) break; } SH1106_WC(0xB0+posy); SH1106_WC(2); SH1106_WC(0x10); SH_Data; SH_CsLo; HAL_SPI_Transmit_DMA(&hspi3,dt,128); timec=HAL_GetTick(); timer=timec+50; while ((HAL_SPI_GetState(&hspi3) != HAL_SPI_STATE_READY)&&(timec&lt;timer)) {timec=HAL_GetTick();} SH_CsHi; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c, \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <b>spi1106.c<\/b> \u043f\u043e\u0441\u043b\u0435 \u043c\u0435\u043b\u043a\u043e\u0433\u043e \u0448\u0440\u0438\u0444\u0442\u0430 \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0440\u0435\u0434\u043d\u0438\u0439 (\u0432\u044b\u0441\u043e\u0442\u0430 16, \u0448\u0438\u0440\u0438\u043d\u0430 12 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439) \u0438\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 \u0444\u0430\u0439\u043b\u0430 <b>DefaultFonts.c<\/b> (\u0442\u0430\u043a\u0436\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u0435 4 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0445 \u0431\u0430\u0439\u0442\u0430 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430) \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0435\u0447\u0430\u0442\u0438 \u0441\u0440\u0435\u0434\u043d\u0438\u043c \u0448\u0440\u0438\u0444\u0442\u043e\u043c \u0432\u044b\u0441\u043e\u0442\u043e\u0439 \u0434\u0432\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0433\u0434\u0435 <b>posx<\/b> \u0437\u043d\u0430\u043a\u043e\u043c\u0435\u0441\u0442\u043e, \u043a\u0440\u0430\u0442\u043d\u043e\u0435 \u0443\u0436\u0435 12 \u043f\u0438\u043a\u0441\u0435\u043b\u044f\u043c \u0434\u0438\u0441\u043f\u043b\u0435\u044f, \u0430 <b>posy<\/b> \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void sh1106MediumPrint(uint8_t posx, uint8_t posy, uint8_t *str) { uint8_t dt[256]; uint16_t posfont, posscr; uint32_t *adrdst, *adrsrc; uint32_t timer,timec; adrdst=(uint32_t *)&dt; uint8_t code; code=*str++; for(uint8_t i=0;i&lt;64;i++) { *adrdst++=0; } posscr=posx*12; while (code&gt;31) {posfont=24*(code-32); adrsrc=(uint32_t *)&MediumFont[posfont]; adrdst=(uint32_t *)&dt[posscr]; *(adrdst++)=*(adrsrc++); *(adrdst++)=*(adrsrc++); *(adrdst++)=*(adrsrc++); adrsrc=(uint32_t *)&MediumFont[posfont+12]; adrdst=(uint32_t *)&dt[posscr+128]; *(adrdst++)=*(adrsrc++); *(adrdst++)=*(adrsrc++); *(adrdst++)=*(adrsrc++); code=*str++; posscr+=12; if (posscr&gt;116) break; } SH1106_WC(0xB0+posy); SH1106_WC(2); SH1106_WC(0x10); SH_Data; SH_CsLo; HAL_SPI_Transmit_DMA(&hspi3,dt,128); timec=HAL_GetTick(); timer=timec+50; while ((HAL_SPI_GetState(&hspi3) != HAL_SPI_STATE_READY)&&(timec&lt;timer)) {timec=HAL_GetTick();} SH1106_WC(0xB0+posy+1); SH1106_WC(2); SH1106_WC(0x10); SH_Data; SH_CsLo; HAL_SPI_Transmit_DMA(&hspi3,dt+128,128); timec=HAL_GetTick(); timer=timec+50; while ((HAL_SPI_GetState(&hspi3) != HAL_SPI_STATE_READY)&&(timec&lt;timer)) {timec=HAL_GetTick();} SH_CsHi; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 <b>main.c<\/b> \u043f\u043e\u0441\u043b\u0435 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 :<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">sh1106SmallPrint(0,0,(uint8_t *) &quot;Hello SH1106_1234567890&quot;); sh1106MediumPrint(0,1,(uint8_t *) &quot;Hi SH1106&quot;); sh1106MediumPrint(0,3,(uint8_t *) &quot;Hello SH1106&quot;);<\/code><\/pre>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tf\/vj\/w2\/tfvjw21_o0vr9ricplvd2dgmnny.jpeg\" width=\"30%\" alt=\"hello\" \/><\/div>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0431\u0440\u0435\u0437\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443, \u043d\u0435 \u043d\u0430\u043b\u0435\u0437\u0430\u044f \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438 \u043d\u0435 \u0432\u044b\u043b\u0435\u0442\u0430\u044f \u0432 HardFault \u043f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u0437\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u0443\u0444\u0435\u0440. \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0449\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432\u044b\u0432\u043e\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b, \u043d\u043e \u0447\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043c\u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043a\u0430 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u044d\u0442\u043e \u043d\u0430 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0430\u0441.<\/p>\n<p>  <\/p>\n<p>\u0418 \u0432 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430, \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043f\u0438\u043a\u0441\u0435\u043b\u044e \u0431\u0443\u0444\u0435\u0440 \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 7 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0438 \u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0432\u0440\u0435\u043c\u044f \u0432 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445 :<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">\/* Infinite loop *\/ \/* USER CODE BEGIN WHILE *\/ uint8_t buf[128*8]; char str[32]; uint16_t count; uint8_t x,y,b; uint32_t timep,timec; while (1) { count++; b=count&0x07; x=(count&gt;&gt;3)&0x7f; y=(count&gt;&gt;10)&0x07; buf[y*128+x]=buf[y*128+x]|(1&lt;&lt;b); timec=HAL_GetTick(); for (uint8_t m = 0; m &lt; 7; m++) {SH1106_WC(0xB0+m); SH1106_WC(2); SH1106_WC(0x10); SH_Data; SH_CsLo; HAL_SPI_Transmit_DMA(&hspi3,buf+m*128,128); while ((HAL_SPI_GetState(&hspi3) != HAL_SPI_STATE_READY)) {__NOP();} SH_CsHi; } timep=HAL_GetTick(); sprintf(str, &quot;%d&quot;, timep-timec); sh1106SmallPrint(0,7,str); \/* USER CODE END WHILE *\/<\/code><\/pre>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zv\/s6\/dr\/zvs6drudhdol7d4thxznyw9gti4.jpeg\" width=\"30%\" alt=\"speed\" \/><\/div>\n<p>  <\/p>\n<p>\u041f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u2014 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0438 \u043c\u0435\u043b\u044c\u043a\u0430\u044e\u0449\u0438\u043c \u0432 \u043d\u0438\u0436\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0442\u043e &quot;0&quot; \u0442\u043e &quot;1&quot; \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u043c\u0438 \u0441\u0442\u0440\u043e\u043a \u044d\u043a\u0440\u0430\u043d\u0430 \u043c\u0435\u043d\u0435\u0435 1ms, \u0442.\u0435. \u043e\u043a\u043e\u043b\u043e 1000fps. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0431\u0443\u0444\u0435\u0440\u0435, \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u043d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u0435\u0442. \u0414\u0430 \u0438 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u043e \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0438 \u043f\u043e SPI \u0438 \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u0435\u043b\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u041c\u041a \u0438 \u043f\u0435\u0440\u0435\u043a\u0438\u0434\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u043e SPI \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 DMA.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0434\u0430\u043d\u043d\u0430\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0432\u0430\u043c \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c \u0434\u0438\u0441\u043f\u043b\u0435\u0435\u043c.<\/p>\n<\/p>\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\/516260\/\"> https:\/\/habr.com\/ru\/post\/516260\/<\/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\/516260\/\">\n<p>\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438. \u0412 \u0441\u0432\u043e\u0438\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430\u0445 \u043d\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445 STM32, \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u044f \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c OLED \u0434\u0438\u0441\u043f\u043b\u0435\u044f\u043c\u0438 \u043d\u0430 \u0447\u0438\u043f\u0435 SSD1306. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438\u0448\u0435\u043b \u043a\u043e \u043c\u043d\u0435 1,3&quot; SPI \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e \u0434\u0435\u043c\u043e\u043a\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0439 \u0446\u0435\u043d\u0435 \u2014 \u043e\u043a\u043e\u043b\u043e 200\u0440\u0443\u0431. \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0431\u0440\u043e\u0441\u0438\u043b\u043e\u0441\u044c \u0432 \u0433\u043b\u0430\u0437\u0430 \u2014 \u043d\u0430\u0434\u043f\u0438\u0441\u044c SH1106 \u0432\u043c\u0435\u0441\u0442\u043e SSD1306, \u043f\u043e\u0438\u0441\u043a \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043f\u0440\u043e\u044f\u0441\u043d\u0438\u043b, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438, \u0434\u0430 \u0438 \u0442\u043e\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439. \u041a\u0430\u043a \u0441 \u043d\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u044f \u0438 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0432\u0430\u043c \u0432 \u044d\u0442\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p> \u0413\u0434\u0435-\u0442\u043e \u0441 \u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434 \u043c\u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0438\u043d\u0435\u0439 \u043f\u0438\u043b\u044e\u043b\u0438 (STM32F103) \u0438 \u0431\u044b\u043b\u0430 \u0437\u0430\u043a\u0430\u0437\u0430\u043d\u0430 \u043a\u0438\u0442\u0430\u0439\u0441\u043a\u0430\u044f \u043f\u043b\u0430\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 STM32F407VE. \u0414\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u0447\u0430\u0441\u0442\u043e, \u0434\u0432\u0443\u0445 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e OLED SSD1306 \u043f\u043e \u0448\u0438\u043d\u0435 I2C, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043b\u044e\u0431\u0438\u043b\u0441\u044f \u0435\u0449\u0435 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d Arduino. \u0422\u0430\u043a \u043a\u0430\u043a \u0433\u0440\u0430\u0444\u0438\u043a\u0443 \u044f \u043d\u0430 \u043d\u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0432\u043e\u0436\u0443, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0447\u0438\u0441\u043b\u0430 \u0438 \u0442\u0435\u043a\u0441\u0442, \u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043f\u043e\u0440\u0430\u0436\u0430\u043b \u043c\u043e\u0435 \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u043e\u0434 SH1106 \u0438 \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0435\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f. \u0414\u0438\u0441\u043f\u043b\u0435\u0439 \u043f\u0440\u0438\u0435\u0445\u0430\u043b 7pin SPI:<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xz\/1j\/0j\/xz1j0jgzfl0h_bjfgc4xar2w5do.jpeg\" width=\"25%\" alt=\"sh1106\" \/><\/div>\n<p>  <\/p>\n<p>\u041f\u043b\u0430\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0443 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u0430\u044f, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u043c\u0435\u0448\u0430\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a \u0434\u0440\u0443\u0433\u043e\u0439, \u0445\u043e\u0442\u044c \u043d\u0430 STM3F103, \u0434\u043b\u044f \u0447\u0435\u0433\u043e HAL \u0438 \u0431\u044b\u043b \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d (\u0440\u0430\u0437\u0432\u0435 \u043d\u0435 \u0442\u0430\u043a ?):<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0d\/uy\/95\/0duy95uya1v_frcw1hrpmnu10xw.jpeg\" width=\"250\" alt=\"F407board\" \/><\/div>\n<p>  <\/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-308886","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308886","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=308886"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308886\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=308886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=308886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=308886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}