{"id":317212,"date":"2021-01-30T15:00:19","date_gmt":"2021-01-30T15:00:19","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=317212"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=317212","title":{"rendered":"\u0421\u043d\u043e\u0432\u0430 \u043f\u0440\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u044b C++ \u0432 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<h2>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>    \u0418\u0434\u0435\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u044f\u0437\u044b\u043a\u0430 C++ \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u043c-\u0442\u043e \u043d\u043e\u0432\u044b\u043c, \u0432 \u0441\u0435\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432. \u041a\u0440\u0430\u0442\u043a\u043e \u043d\u0430\u043f\u043e\u043c\u043d\u044e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430: \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0438\u0437 runtime \u0432 compile-time \u0437\u0430 \u0441\u0447\u0435\u0442 \u0441\u0442\u0440\u043e\u0433\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0442\u0438\u043f\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0434\u0445\u043e\u0434\u0443, \u0431\u043b\u0438\u0437\u043a\u0438\u0439 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043c\u043d\u043e\u0433\u0438\u043c, \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 (\u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438). \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435 \u0430\u0432\u0442\u043e\u0440\u044b \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0435\u0442\u0443 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0432\u043e\u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u0430\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438 \u0438 \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430. \u0412 \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u044d\u0442\u0438 \u0438\u0434\u0435\u0438.<\/p>\n<h2>\u041d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u0442\u044c \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u0431\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c<\/h2>\n<p>    \u041e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. \u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043e\u0434\u043d\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445. \u0418 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0443\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430: \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u043a\u043b\u0430\u0441\u0441 <em>A<\/em> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <em>B <\/em>\u0441\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438,  \u0442\u043e \u043a\u043b\u0430\u0441\u0441 <em>B<\/em> \u0442\u043e\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u043c \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u0432\u0441\u0435\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0435.<\/p>\n<p>    \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, USART \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0432\u043e\u0438\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432, \u0442\u043e\u0433\u0434\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c (\u043a\u043e\u0434, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432, \u0432\u0437\u044f\u0442 <a href=\"https:\/\/habr.com\/ru\/post\/459642\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a>, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0430 \u0441\u0432\u044f\u0437\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0435\u0439, \u0441\u043f\u0430\u0441\u0438\u0431\u043e <a class=\"mention\" href=\"\/users\/lamerok\">@lamerok<\/a> \u0437\u0430 \u043a\u0440\u0443\u0442\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b. \u0421\u0430\u043c \u044f \u043f\u043e\u043a\u0430 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043c \u043e\u0431\u0435\u0440\u0442\u043e\u043a \u043d\u0435 \u043f\u0435\u0440\u0435\u0448\u0435\u043b, \u043d\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e.):<\/p>\n<pre><code>template &lt;typename _Regs&gt; class Usart { public:   static void Init()   {     _Regs::CR1Pack&lt;_Regs::CR1::UE, _Regs::CR1::RE, _Regs::CR1::TE&gt;::Set();     \/\/ \u0415\u0449\u0435 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.   } }<\/code><\/pre>\n<p>\u0421 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 UART, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d<\/p>\n<pre><code>using Usart1 = Usart&lt;USART1&gt;;<\/code><\/pre>\n<p>\u0412\u0440\u043e\u0434\u0435 \u0431\u044b \u0432\u0441\u0435 \u0437\u0434\u043e\u0440\u043e\u0432\u043e, \u043e\u0434\u043d\u0430\u043a\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 USART \u0438\u043c\u0435\u0435\u0442 \u0438\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<ol>\n<li>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440 \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u043d\u0438\u044f (RCC_APB2).<\/p>\n<\/li>\n<li>\n<p>\u041d\u043e\u043c\u0435\u0440 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0431\u043e\u0440 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u044b\u0432\u043e\u0434\u043e\u0432 (Tx \u0438 Rx).<\/p>\n<\/li>\n<li>\n<p>Dma (Tx \u0438 Rx).<\/p>\n<\/li>\n<\/ol>\n<p>\u0418 \u043e\u0434\u0438\u043d \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 \u041e\u041e\u041f &#8212; \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f &#8212; \u043d\u0430\u043c\u0435\u043a\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u0441\u0451 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0442\u043e\u0436\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u043d\u0435\u0441\u0442\u0438 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043b\u0430\u0441\u0441\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code>template &lt;typename _Regs, typename _ClockCtrl&gt; class Usart { public:   static void Init()   {     \/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438     _ClockCtrl::Enable()     _Regs::CR1Pack&lt;_Regs::CR1::UE, _Regs::CR1::RE, _Regs::CR1::TE&gt;::Set();     ...   } }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0432 \u0435\u0433\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 Init \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043b\u0438\u0448\u043d\u044f\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0447\u0442\u0435\u043d\u0438\u044f\/\u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 RCC_ARB2, \u043d\u043e \u0447\u0430\u0441\u0442\u043e \u043b\u0438 \u0442\u0430\u043a\u043e\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438?<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u043b\u0438\u043d\u0438\u044e \u0441\u0442\u0440\u043e\u0433\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0442\u0438\u043f\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0443\u0440\u043e\u043a\u0430\u0445 \u043f\u043e \u0442\u043e\u043c\u0443 \u0436\u0435 USART \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b<\/p>\n<pre><code> \/\/ \u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 TX UART \u043d\u0430 SPL. GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_40MHz; GPIO_Init(GPIOD, &amp;GPIO_InitStructure); \/\/\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c <\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u0432\u044b\u0431\u043e\u0440\u044b \u043f\u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442\u0430: \u043c\u043e\u0436\u043d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432\u0441\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0423\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u0438\u043d\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u0435\u0449\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438:<\/p>\n<pre><code>\/\/ \u041c\u0435\u0442\u043e\u0434 \u0432\u044b\u0431\u043e\u0440\u0430 Tx \u0438 Rx \u0432\u044b\u0432\u043e\u0434\u043e\u0432. template&lt;typename _Regs, IRQn_Type _IRQNumber, typename _ClockCtrl, typename _TxPins, typename _RxPins, typename _DmaTx, typename _DmaRx&gt; template&lt;typename TxPin, typename RxPin&gt; void Usart&lt;_Regs, _IRQNumber, _ClockCtrl, _TxPins, _RxPins, _DmaTx, _DmaRx&gt;::SelectTxRxPins() {   const int8_t txPinIndex = TypeIndex&lt;TxPin, _TxPins&gt;::value;   const int8_t rxPinIndex = !std::is_same_v&lt;RxPin, IO::NullPin&gt;         ? TypeIndex&lt;RxPin, typename _RxPins&gt;::value         : -1; \/\/ \u0425\u043e\u0442\u044f \u0442\u0443\u0442 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 NullPin \u043e\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430   static_assert(txPinIndex &gt;= 0);   \/\/ \u0412 \u043f\u043e\u043b\u0443\u0434\u0443\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 Rx \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430   static_assert(rxPinIndex &gt;= -1);   SelectTxRxPins&lt;txPinIndex, rxPinIndex&gt;(); }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 USART \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 SelectTxRxPins \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u0442 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435, \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 \u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0437-\u0437\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432 static_assert.<\/p>\n<p>    \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u044f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 C++ \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0438 GPIO, \u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u044f \u0438 \u0434\u0430\u0436\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.<\/p>\n<pre><code>\/\/ \u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u0447\u0430\u0441\u043e\u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 DS1307 template &lt;typename _I2CBus&gt; class Ds1307 {   ...   static Time GetDateTime()   {     Time time;     _I2CBus::Read(Ds1307Address, 0x00, &amp;time, sizeof(time));     ...<\/code><\/pre>\n<p>\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u0438\u043f\u0430:<\/p>\n<pre><code>using Rtc = Ds1307&lt;I2c1&gt;;<\/code><\/pre>\n<h2>\u0422\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043e\u0440\u0438\u044e \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443<\/h2>\n<p>   \u0418\u0437 \u0432\u0441\u0435\u0445 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0432\u0438\u0434\u0435\u043b, \u0442\u043e\u043b\u044c\u043a\u043e \u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0438\u043d \u0427\u0438\u0436\u043e\u0432 (\u043e\u043d \u0436\u0435 neiver, \u0430\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/easyelectronics.ru\/rabota-s-portami-vvoda-vyvoda-mikrokontrollerov-na-si.html\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u043d\u0430 \u0421\u0438++<\/a> \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0435 easyelectronics.ru) \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0437\u0430\u043f\u044f\u0442\u0443\u044e <strong>\u043f\u043e\u0441\u043b\u0435 <\/strong>\u0441\u043b\u043e\u0432\u0430 &#171;\u043d\u0435\u043b\u044c\u0437\u044f&#187;. \u0412 \u0435\u0433\u043e <a href=\"https:\/\/github.com\/KonstantinChizhov\/Mcucpp\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a> \u043d\u0430 github \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 &#171;Mcucpp&#187;, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u0434\u0435\u0438 \u043c\u0435\u0442\u0430\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043a\u0430\u043a \u044d\u0442\u043e \u043d\u0435\u0440\u0435\u0434\u043a\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432, \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0447\u0438\u0442\u0430\u044e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438, \u0447\u0442\u043e \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 (\u0442\u0438\u043f\u0430 \u043c\u0435\u043d\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0447\u0430\u043b \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u043c\u0438 \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 2019, \u0432 \u0432\u0438\u0434\u0435 \u0445\u043e\u0431\u0431\u0438). \u0422\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438 \u0437\u0430\u0434\u0430\u0447 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435\u0442, \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0438\u043d\u0430, \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430, \u043f\u0438\u0441\u0430\u0442\u044c Doxy-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/azhel12\/Zhele\" rel=\"noopener noreferrer nofollow\">Zhele<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0427\u0438\u0436\u043e\u0432\u0430 \u0441\u043e\u0437\u0434\u0430\u044e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 Stm32. \u0421\u0440\u0430\u0437\u0443 \u043e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0433\u0434\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0435\u043c\u043d\u043e\u0433\u043e, \u043f\u0438\u0448\u0443 \u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0438\u043d\u0430 \u0427\u0438\u0436\u043e\u0432\u0430.<\/p>\n<blockquote>\n<p><em>&#171;\u041b\u0443\u0447\u0448\u0435 \u043c\u0435\u043d\u044c\u0448\u0435, \u0434\u0430 \u043b\u0443\u0447\u0448\u0435&#187; <\/em>\u00a9 \u0412.\u0418. \u041b\u0435\u043d\u0438\u043d<\/p>\n<\/blockquote>\n<p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0435\u0449\u0435 \u043d\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439, \u043e\u0434\u043d\u0430\u043a\u043e \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u044b \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u043d\u0438\u0435, gpio, \u0442\u0430\u0439\u043c\u0435\u0440\u044b, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b i2c\/spi\/uart\/one-wire, \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c.<\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0432\u0441\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f. \u0421\u0435\u0439\u0447\u0430\u0441 \u043a\u043e\u043f\u0430\u044e \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 custom-\u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0434\u043b\u044f CubeIDE. \u041e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u043b\u044e\u0434\u044c\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e, \u0447\u0442\u043e \u043f\u0440\u0438 \u0432\u0441\u0435\u0445 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430\u0445, \u043a\u0443\u0431 \u0438\u043c \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u044d\u0442\u043e \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u043c\u0438\u0440 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0447\u0438\u0442\u0430\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u044b, \u0441\u0440\u0430\u0437\u0443 \u0432 \u043a\u0443\u0431\u0435, \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043e\u0441\u0438\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0438 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u0435\u043c\u043e\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<h2>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438<\/h2>\n<ol>\n<li>\n<p><a href=\"http:\/\/easyelectronics.ru\/rabota-s-portami-vvoda-vyvoda-mikrokontrollerov-na-si.html\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u043d\u0430 \u0421\u0438++<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/473612\/\" rel=\"noopener noreferrer nofollow\">\u0422\u0440\u0430\u043a\u0442\u0430\u0442 \u043e Pin\u0435. \u041c\u044b\u0441\u043b\u0438 \u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043f\u0438\u043d\u0430\u043c\u0438 \u043d\u0430 \u0421++ \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 (\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 CortexM)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/459642\/\" rel=\"noopener noreferrer nofollow\">\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u043e\u043b\u044f\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u043d\u0430 \u0421++ \u0431\u0435\u0437 \u0443\u0449\u0435\u0440\u0431\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 (\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 CortexM)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/357910\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u0430\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 AVR<\/a><\/p>\n<\/li>\n<li>\n<\/li>\n<\/ol>\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\/540064\/\"> https:\/\/habr.com\/ru\/post\/540064\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<h2>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>    \u0418\u0434\u0435\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u044f\u0437\u044b\u043a\u0430 C++ \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u043c-\u0442\u043e \u043d\u043e\u0432\u044b\u043c, \u0432 \u0441\u0435\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432. \u041a\u0440\u0430\u0442\u043a\u043e \u043d\u0430\u043f\u043e\u043c\u043d\u044e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430: \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0438\u0437 runtime \u0432 compile-time \u0437\u0430 \u0441\u0447\u0435\u0442 \u0441\u0442\u0440\u043e\u0433\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0442\u0438\u043f\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0434\u0445\u043e\u0434\u0443, \u0431\u043b\u0438\u0437\u043a\u0438\u0439 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043c\u043d\u043e\u0433\u0438\u043c, \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 (\u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438). \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435 \u0430\u0432\u0442\u043e\u0440\u044b \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0435\u0442\u0443 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0432\u043e\u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u0430\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438 \u0438 \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430. \u0412 \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u044d\u0442\u0438 \u0438\u0434\u0435\u0438.<\/p>\n<h2>\u041d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u0442\u044c \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u0431\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c<\/h2>\n<p>    \u041e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. \u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043e\u0434\u043d\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445. \u0418 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0443\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430: \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u043a\u043b\u0430\u0441\u0441 <em>A<\/em> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <em>B <\/em>\u0441\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438,  \u0442\u043e \u043a\u043b\u0430\u0441\u0441 <em>B<\/em> \u0442\u043e\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u043c \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u0432\u0441\u0435\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0435.<\/p>\n<p>    \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, USART \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0432\u043e\u0438\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432, \u0442\u043e\u0433\u0434\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c (\u043a\u043e\u0434, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432, \u0432\u0437\u044f\u0442 <a href=\"https:\/\/habr.com\/ru\/post\/459642\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a>, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0430 \u0441\u0432\u044f\u0437\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0435\u0439, \u0441\u043f\u0430\u0441\u0438\u0431\u043e <a class=\"mention\" href=\"\/users\/lamerok\">@lamerok<\/a> \u0437\u0430 \u043a\u0440\u0443\u0442\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b. \u0421\u0430\u043c \u044f \u043f\u043e\u043a\u0430 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043c \u043e\u0431\u0435\u0440\u0442\u043e\u043a \u043d\u0435 \u043f\u0435\u0440\u0435\u0448\u0435\u043b, \u043d\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e.):<\/p>\n<pre><code>template &lt;typename _Regs&gt; class Usart { public:   static void Init()   {     _Regs::CR1Pack&lt;_Regs::CR1::UE, _Regs::CR1::RE, _Regs::CR1::TE&gt;::Set();     \/\/ \u0415\u0449\u0435 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.   } }<\/code><\/pre>\n<p>\u0421 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 UART, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d<\/p>\n<pre><code>using Usart1 = Usart&lt;USART1&gt;;<\/code><\/pre>\n<p>\u0412\u0440\u043e\u0434\u0435 \u0431\u044b \u0432\u0441\u0435 \u0437\u0434\u043e\u0440\u043e\u0432\u043e, \u043e\u0434\u043d\u0430\u043a\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 USART \u0438\u043c\u0435\u0435\u0442 \u0438\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<ol>\n<li>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440 \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u043d\u0438\u044f (RCC_APB2).<\/p>\n<\/li>\n<li>\n<p>\u041d\u043e\u043c\u0435\u0440 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0431\u043e\u0440 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u044b\u0432\u043e\u0434\u043e\u0432 (Tx \u0438 Rx).<\/p>\n<\/li>\n<li>\n<p>Dma (Tx \u0438 Rx).<\/p>\n<\/li>\n<\/ol>\n<p>\u0418 \u043e\u0434\u0438\u043d \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 \u041e\u041e\u041f &#8212; \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f &#8212; \u043d\u0430\u043c\u0435\u043a\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u0441\u0451 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0442\u043e\u0436\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u043d\u0435\u0441\u0442\u0438 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043b\u0430\u0441\u0441\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code>template &lt;typename _Regs, typename _ClockCtrl&gt; class Usart { public:   static void Init()   {     \/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438     _ClockCtrl::Enable()     _Regs::CR1Pack&lt;_Regs::CR1::UE, _Regs::CR1::RE, _Regs::CR1::TE&gt;::Set();     ...   } }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0432 \u0435\u0433\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 Init \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043b\u0438\u0448\u043d\u044f\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0447\u0442\u0435\u043d\u0438\u044f\/\u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 RCC_ARB2, \u043d\u043e \u0447\u0430\u0441\u0442\u043e \u043b\u0438 \u0442\u0430\u043a\u043e\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438?<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u043b\u0438\u043d\u0438\u044e \u0441\u0442\u0440\u043e\u0433\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0442\u0438\u043f\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0443\u0440\u043e\u043a\u0430\u0445 \u043f\u043e \u0442\u043e\u043c\u0443 \u0436\u0435 USART \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b<\/p>\n<pre><code> \/\/ \u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 TX UART \u043d\u0430 SPL. GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_40MHz; GPIO_Init(GPIOD, &amp;GPIO_InitStructure); \/\/\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c <\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u0432\u044b\u0431\u043e\u0440\u044b \u043f\u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442\u0430: \u043c\u043e\u0436\u043d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432\u0441\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0423\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u0438\u043d\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u0435\u0449\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438:<\/p>\n<pre><code>\/\/ \u041c\u0435\u0442\u043e\u0434 \u0432\u044b\u0431\u043e\u0440\u0430 Tx \u0438 Rx \u0432\u044b\u0432\u043e\u0434\u043e\u0432. template&lt;typename _Regs, IRQn_Type _IRQNumber, typename _ClockCtrl, typename _TxPins, typename _RxPins, typename _DmaTx, typename _DmaRx&gt; template&lt;typename TxPin, typename RxPin&gt; void Usart&lt;_Regs, _IRQNumber, _ClockCtrl, _TxPins, _RxPins, _DmaTx, _DmaRx&gt;::SelectTxRxPins() {   const int8_t txPinIndex = TypeIndex&lt;TxPin, _TxPins&gt;::value;   const int8_t rxPinIndex = !std::is_same_v&lt;RxPin, IO::NullPin&gt;         ? TypeIndex&lt;RxPin, typename _RxPins&gt;::value         : -1; \/\/ \u0425\u043e\u0442\u044f \u0442\u0443\u0442 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 NullPin \u043e\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430   static_assert(txPinIndex &gt;= 0);   \/\/ \u0412 \u043f\u043e\u043b\u0443\u0434\u0443\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 Rx \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430   static_assert(rxPinIndex &gt;= -1);   SelectTxRxPins&lt;txPinIndex, rxPinIndex&gt;(); }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 USART \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 SelectTxRxPins \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u0442 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435, \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 \u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0437-\u0437\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432 static_assert.<\/p>\n<p>    \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u044f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 C++ \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0438 GPIO, \u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u044f \u0438 \u0434\u0430\u0436\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.<\/p>\n<pre><code>\/\/ \u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u0447\u0430\u0441\u043e\u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 DS1307 template &lt;typename _I2CBus&gt; class Ds1307 {   ...   static Time GetDateTime()   {     Time time;     _I2CBus::Read(Ds1307Address, 0x00, &amp;time, sizeof(time));     ...<\/code><\/pre>\n<p>\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u0438\u043f\u0430:<\/p>\n<pre><code>using Rtc = Ds1307&lt;I2c1&gt;;<\/code><\/pre>\n<h2>\u0422\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043e\u0440\u0438\u044e \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443<\/h2>\n<p>   \u0418\u0437 \u0432\u0441\u0435\u0445 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0432\u0438\u0434\u0435\u043b, \u0442\u043e\u043b\u044c\u043a\u043e \u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0438\u043d \u0427\u0438\u0436\u043e\u0432 (\u043e\u043d \u0436\u0435 neiver, \u0430\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/easyelectronics.ru\/rabota-s-portami-vvoda-vyvoda-mikrokontrollerov-na-si.html\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u043d\u0430 \u0421\u0438++<\/a> \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0435 easyelectronics.ru) \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0437\u0430\u043f\u044f\u0442\u0443\u044e <strong>\u043f\u043e\u0441\u043b\u0435 <\/strong>\u0441\u043b\u043e\u0432\u0430 &#171;\u043d\u0435\u043b\u044c\u0437\u044f&#187;. \u0412 \u0435\u0433\u043e <a href=\"https:\/\/github.com\/KonstantinChizhov\/Mcucpp\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a> \u043d\u0430 github \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 &#171;Mcucpp&#187;, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u0434\u0435\u0438 \u043c\u0435\u0442\u0430\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043a\u0430\u043a \u044d\u0442\u043e \u043d\u0435\u0440\u0435\u0434\u043a\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432, \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0447\u0438\u0442\u0430\u044e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438, \u0447\u0442\u043e \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 (\u0442\u0438\u043f\u0430 \u043c\u0435\u043d\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0447\u0430\u043b \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u043c\u0438 \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 2019, \u0432 \u0432\u0438\u0434\u0435 \u0445\u043e\u0431\u0431\u0438). \u0422\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438 \u0437\u0430\u0434\u0430\u0447 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435\u0442, \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0438\u043d\u0430, \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430, \u043f\u0438\u0441\u0430\u0442\u044c Doxy-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/azhel12\/Zhele\" rel=\"noopener noreferrer nofollow\">Zhele<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0427\u0438\u0436\u043e\u0432\u0430 \u0441\u043e\u0437\u0434\u0430\u044e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 Stm32. \u0421\u0440\u0430\u0437\u0443 \u043e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0433\u0434\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0435\u043c\u043d\u043e\u0433\u043e, \u043f\u0438\u0448\u0443 \u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0438\u043d\u0430 \u0427\u0438\u0436\u043e\u0432\u0430.<\/p>\n<blockquote>\n<p><em>&#171;\u041b\u0443\u0447\u0448\u0435 \u043c\u0435\u043d\u044c\u0448\u0435, \u0434\u0430 \u043b\u0443\u0447\u0448\u0435&#187; <\/em>\u00a9 \u0412.\u0418. \u041b\u0435\u043d\u0438\u043d<\/p>\n<\/blockquote>\n<p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0435\u0449\u0435 \u043d\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439, \u043e\u0434\u043d\u0430\u043a\u043e \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u044b \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u043d\u0438\u0435, gpio, \u0442\u0430\u0439\u043c\u0435\u0440\u044b, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b i2c\/spi\/uart\/one-wire, \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c.<\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0432\u0441\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f. \u0421\u0435\u0439\u0447\u0430\u0441 \u043a\u043e\u043f\u0430\u044e \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 custom-\u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0434\u043b\u044f CubeIDE. \u041e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u043b\u044e\u0434\u044c\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e, \u0447\u0442\u043e \u043f\u0440\u0438 \u0432\u0441\u0435\u0445 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430\u0445, \u043a\u0443\u0431 \u0438\u043c \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u044d\u0442\u043e \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u043c\u0438\u0440 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0447\u0438\u0442\u0430\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u044b, \u0441\u0440\u0430\u0437\u0443 \u0432 \u043a\u0443\u0431\u0435, \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043e\u0441\u0438\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0438 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u0435\u043c\u043e\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<h2>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438<\/h2>\n<ol>\n<li>\n<p><a href=\"http:\/\/easyelectronics.ru\/rabota-s-portami-vvoda-vyvoda-mikrokontrollerov-na-si.html\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u043d\u0430 \u0421\u0438++<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/473612\/\" rel=\"noopener noreferrer nofollow\">\u0422\u0440\u0430\u043a\u0442\u0430\u0442 \u043e Pin\u0435. \u041c\u044b\u0441\u043b\u0438 \u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043f\u0438\u043d\u0430\u043c\u0438 \u043d\u0430 \u0421++ \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 (\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 CortexM)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/459642\/\" rel=\"noopener noreferrer nofollow\">\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u043e\u043b\u044f\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u043d\u0430 \u0421++ \u0431\u0435\u0437 \u0443\u0449\u0435\u0440\u0431\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 (\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 CortexM)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/357910\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u0430\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 AVR<\/a><\/p>\n<\/li>\n<li>\n<\/li>\n<\/ol>\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\/540064\/\"> https:\/\/habr.com\/ru\/post\/540064\/<\/a><br \/><\/br><\/br><\/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-317212","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/317212","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=317212"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/317212\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=317212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=317212"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=317212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}