{"id":398221,"date":"2024-06-29T13:56:38","date_gmt":"2024-06-29T13:56:38","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=398221"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=398221","title":{"rendered":"<span>\u0425\u0440\u0430\u043d\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u0440\u0435\u0435\u0441\u0442\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/aef\/e5c\/6ea\/aefe5c6ea6317b3fbd1f8e41f25f7b19.jpg\" width=\"568\" height=\"335\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aef\/e5c\/6ea\/aefe5c6ea6317b3fbd1f8e41f25f7b19.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0412 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0438 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043c\u044b \u0447\u0430\u0441\u0442\u043e \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u042d\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u0430\u043a \u044f\u0440\u043a\u043e\u0441\u0442\u044c \u0434\u0438\u0441\u043f\u043b\u0435\u044f, \u044f\u0437\u044b\u043a, \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0440\u0430\u0434\u0438\u043e\u043a\u0430\u043d\u0430\u043b\u0430 \u0438\u043b\u0438 IP \u0430\u0434\u0440\u0435\u0441 \u2013 \u0434\u0430 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u0415\u0434\u0438\u043d\u043e\u0433\u043e \u043e\u0431\u0449\u0435\u043f\u0440\u0438\u043d\u044f\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435\u0442, \u0438 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u043d\u0438\u0436\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u0438\u0445 \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u043f\u0440\u0438\u0448\u0435\u043b \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438. \u041f\u043e\u0435\u0445\u0430\u043b\u0438!<\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0449\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u041f\u0417\u0423.<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c \u043f\u0438\u0442\u0430\u043d\u0438\u0438 \u043b\u044e\u0434\u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u0438 \u041f\u0417\u0423 (\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0435 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0449\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e). \u0412 \u043c\u0438\u0440\u0435 Embedded \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0435 \u0432 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u041f\u0417\u0423 \u043b\u0438\u0431\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u0435 (\u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0443 \u0438\u043b\u0438 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443) \u041f\u0417\u0423 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u044b, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u043e\u0439 \u043a \u043f\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c SPI \u0438\u043b\u0438 I2C. \u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u041f\u0417\u0423 \u0432 \u043a\u0440\u0435\u043c\u043d\u0438\u0438 \u0442\u0430\u043a\u043e\u0432\u044b, \u0447\u0442\u043e \u0438\u0437 \u041f\u0417\u0423 \u043c\u043e\u0436\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u0430\u0434\u0440\u0435\u0441\u0430\u043c, \u0430 \u0432\u043e\u0442 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0443\u0436\u043d\u043e \u041f\u0417\u0423 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0435\u0440\u0435\u0442\u044c. \u0421\u0442\u0438\u0440\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u044e \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0443 \u0438\u043b\u0438 \u0436\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442. \u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432\u043d\u0443\u0442\u0440\u0438, \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0435\u043a\u0442\u043e\u0440, \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0431\u0430\u0439\u0442. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0432\u0440\u0435\u043c\u044f \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u0430\u0439\u0442\u0430, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0440\u0430\u0432\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0447\u0442\u043e \u043d\u0430\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u0442 \u043d\u0430 \u043c\u044b\u0441\u043b\u044c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0441\u0442\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u044f\u0432\u043d\u043e. \u0412\u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f \u043a\u0430\u043a \u0440\u0430\u0437 \u0441\u0430\u043c\u0430\u044f \u0434\u043e\u043b\u0433\u0430\u044f. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0435 \u0436\u0434\u0430\u043b\u0430 \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 \u041f\u0417\u0423, \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0443\u0445\u0438\u0449\u0440\u0435\u043d\u0438\u044f \u2013 \u043a\u0435\u0448 \u0432 \u041e\u0417\u0423 \u0438 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c.<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0435 \u041f\u0417\u0423, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c, \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0434\u0432\u0443\u043c\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438:<\/p>\n<pre><code class=\"cpp\">eeprom_read(uint32_t address, uint8_t *data, uint32_t count); eeprom_write(uint32_t address, const uint8_t *data, uint32_t count);<\/code><\/pre>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0441 \u043d\u0435 \u0432\u043e\u043b\u043d\u0443\u044e\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u041f\u0417\u0423 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u0435. \u0418\u043c\u0435\u044f \u044d\u0442\u0438 \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0430\u0439\u0442 \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0435\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0435\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u044d\u0442\u043e\u043c \u041f\u0417\u0423 \u0438 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0438\u043c\u0438 (\u0447\u0438\u0442\u0430\u0442\u044c \/ \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c). \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 1. <\/p>\n<pre><code class=\"cpp\">uint8_t param1; uint32_t param2; \/\/ \u0427\u0438\u0442\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u0431\u0430\u0439\u0442 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 0x00 eeprom_read(0x00, &amp;param1, 1); do_the_job1(param1); \/\/ \u0427\u0438\u0442\u0430\u0435\u043c 32-\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 0x01 eeprom_read(0x01, &amp;param2, 4); do_the_job2(param2); \/\/ \u041f\u0438\u0448\u0435\u043c \u043e\u0434\u0438\u043d \u0431\u0430\u0439\u0442 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 0x02 eeprom_write(0x02, (const uint8_t *)&amp;param1, 1); \/\/ \u041f\u0438\u0448\u0435\u043c 32-\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 0x03 eeprom_write(0x03, (const uint8_t *)&amp;param2, 4);<\/code><\/pre>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0430\u043c\u044b\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u043b\u043e\u0445\u043e: <\/p>\n<ul>\n<li>\n<p>\u0410\u0434\u0440\u0435\u0441\u0430 \u0437\u0430\u0445\u0430\u0440\u0434\u043a\u043e\u0436\u0435\u043d\u044b. \u041d\u0443\u0436\u043d\u043e \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0434\u0435 \u043a\u0430\u043a\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043b\u0435\u0436\u0438\u0442 \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043d \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0431\u0430\u0439\u0442. \u041f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0447\u0435\u043d\u044c \u0442\u0440\u0443\u0434\u043d\u043e \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u041f\u0417\u0423 \u043f\u043e \u043a\u043e\u0434\u0443 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u0445\u0440\u0430\u043d\u044f\u0449\u0430\u044f\u0441\u044f \u0432 \u041f\u0417\u0423, \u043d\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u043e\u0432. \u041c\u043e\u0436\u043d\u043e \u043d\u0435\u0432\u043e\u0437\u0431\u0440\u0430\u043d\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u0430\u0439\u0442 \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443 4-\u0431\u0430\u0439\u0442\u043e\u0432\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043e\u0448\u0438\u0431\u043e\u043a. \u0412\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f<\/p>\n<\/li>\n<li>\n<p>\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \/ \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043d\u043e\u0433\u043e\u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e\u0437\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 endianness \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u0434 \u043d\u0435\u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0443 \u0430 \u0447\u0442\u043e \u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e?<\/p>\n<ul>\n<li>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431.     <\/p>\n<\/li>\n<li>\n<p>\u0421\u0430\u043c\u0430\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \/ \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0433\u043e\u0434\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 1-2 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u0434\u0435. \u041b\u0430\u0434\u043d\u043e, \u044f \u043f\u043e\u0448\u0443\u0442\u0438\u043b, \u0442\u0430\u043a, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0438\u043a\u0442\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0414\u0430\u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u0439\u043c\u0435\u0442, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0431\u044b \u0430\u0434\u0440\u0435\u0441\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0433\u0434\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0432 \u0432\u0438\u0434\u0435 \u043d\u0430\u0431\u043e\u0440\u0430 \u043c\u0430\u043a\u0440\u043e\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439. \u0412\u043e\u0442 \u0442\u0430\u043a: <\/p>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 2.<\/p>\n<pre><code class=\"cpp\">#define PARAM1_ADDR0x00 #define PARAM2_ADDR0x01 #define PARAM3_ADDR0x05<\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u043a\u043e\u0434\u0435 \u0432\u043c\u0435\u0441\u0442\u043e \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u0430\u0441\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"cpp\">eeprom_read(PARAM2_ADDR, &amp;param2, 4);<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u0435\u0449\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0431\u0430\u0439\u0442\u0430\u0445 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c. \u0427\u0442\u043e \u044d\u0442\u043e \u043d\u0430\u043c \u0434\u0430\u0435\u0442 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043f\u0435\u0440\u0432\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c:<\/p>\n<ul>\n<li>\n<p>\u0410\u0434\u0440\u0435\u0441\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0438\u0445 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0449\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u043d\u044c\u0448\u0435 \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0447\u0438\u0441\u0435\u043b<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u0432\u0441\u0435 \u0442\u0435 \u0436\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438. \u0410 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443? \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u0443\u044e:<\/p>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 3.<\/p>\n<pre><code class=\"cpp\">#define STRUCT_PARAM_ADDR 0x00  struct myParamStruct { uint8_t param1; uint32_t param2; char param3[10]; } paramSet;  \/\/ \u0427\u0438\u0442\u0430\u0435\u043c eeprom_read(STRUCT_PARAM_ADDR, (uint8_t *)&amp;paramSet, sizeof(paramSet)); do_the_job1(&amp;paramSet);  \/\/ \u041f\u0438\u0448\u0435\u043c eeprom_write(STRUCT_PARAM_ADDR, (const uint8_t *)&amp;paramSet, sizeof(paramSet));  \/\/ \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 setVolume(paramSet.param1); paramSet.param2 = getLevel(); <\/code><\/pre>\n<p>\u0423\u0436\u0435 \u043b\u0443\u0447\u0448\u0435. \u0427\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u043d\u0430\u043c \u0434\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443:<\/p>\n<ul>\n<li>\n<p>\u041b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e\u0441\u0442\u044c. \u041e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0438\u043b\u0438 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \/ \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0441\u044c\u043c\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043b\u0438\u0445\u043e \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043c\u0430\u0441\u0441\u0438\u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0430\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0443\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438)<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0437\u0430 \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0437\u043b\u043e\u0436\u0435\u043d \u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440. \u041d\u0430\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u0432 \u041f\u0417\u0423, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0438 \u0435\u0435 \u0440\u0430\u0437\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u0435\u0449\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u0430\u043c \u0436\u0435<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<\/li>\n<li>\n<p>\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u041f\u0417\u0423. \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0443\u0441\u0443\u0433\u0443\u0431\u043b\u044f\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043d\u043e\u0433\u043e<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043e\u0448\u0438\u0431\u043e\u043a. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u043d\u0430 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u041e\u0417\u0423, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0438\u0445 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u043f\u0440\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044e. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044f CRC16 \u0438\u043b\u0438 CRC32 \u043f\u043e\u0431\u0430\u0439\u0442\u043d\u043e \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u0432 \u0442\u0443 \u0436\u0435 \u041f\u0417\u0423.<\/p>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 4.<\/p>\n<pre><code class=\"cpp\">#define STRUCT_PARAM_ADDR 0x00 #define CRC32_ADDR 0x100  struct myParamStruct { uint8_t param1; uint32_t param2; char param3[10]; } paramSet; uint32_t crc32;  \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 #if (STRUCT_PARAM_ADDR + sizeof(paramSet)) > CRC32_ADDR #error Size of struct myParamStruct is too big! #endif  \/\/ \u0427\u0438\u0442\u0430\u0435\u043c eeprom_read(STRUCT_PARAM_ADDR, (uint8_t *)&amp;paramSet, sizeof(paramSet)); eeprom_read(CRC32_ADDR , (uint8_t *)&amp;crc32, sizeof(crc32)); if (get_\u0441rc32(&amp;paramSet, sizeof(paramSet)) != crc32) { \/\/ TODO \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 } do_the_job1(&amp;paramSet);  \/\/ \u041f\u0438\u0448\u0435\u043c eeprom_write(STRUCT_PARAM_ADDR, (const uint8_t *)&amp;paramSet, sizeof(paramSet)); crc32 = get_\u0441rc32(&amp;paramSet, sizeof(paramSet)); eeprom_write(CRC32_ADDR, (uint8_t *)&amp;crc32, sizeof(crc32)); <\/code><\/pre>\n<p>\u0427\u0442\u043e \u043e\u0431\u0449\u0435\u0433\u043e \u0443 \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u041f\u0417\u0423 \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0437 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u043b\u0438 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u041f\u0417\u0423, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u043f\u0440\u0430\u0432\u043a\u0430 application \u043a\u043e\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u041c\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u041f\u0417\u0423, \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432 \u2013 \u0432\u0441\u0435 \u044d\u0442\u043e \u043b\u0438\u0448\u043d\u044f\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u0435\u0448\u0430\u0435\u0442 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u0434\u0435<\/p>\n<\/li>\n<li>\n<p>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u044f\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0438 \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0442\u0440\u0443\u0434\u043d\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c \u0447\u0435\u0440\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 \u043e\u0431\u043c\u0435\u043d\u0430 \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043c\u0438\u0440\u043e\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041d\u0443 \u0438\u043b\u0438 \u0433\u043e\u043d\u044f\u0442\u044c \u043f\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u043f\u043e\u043b\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0431\u0430\u0439\u0442 \u2013 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c \u0432\u0441\u0435 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u044b, \u0435\u0441\u043b\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0432\u0435\u043b\u0438\u043a\u043e. \u042d\u0442\u043e \u043f\u0440\u0430\u0432\u0434\u0430, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u041c\u041a \u0438\u043b\u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u043b\u0443\u0447\u0448\u0435 \u043d\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c. \u041d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043a\u043e\u0434 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043d\u043e\u0433\u043e, \u0438 \u0438\u0445 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0447\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0442 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f (\u0432 \u0447\u0435\u043c-\u0442\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u0438\u043a\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c\u0438 \u041e\u041e\u041f, \u0434\u0430):<\/p>\n<ul>\n<li>\n<p>\u0418\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u043e\u0442 \u0436\u0435\u043b\u0435\u0437\u0430. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u041f\u0417\u0423<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0441\u0442\u044c. \u041c\u043e\u0434\u0443\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0438 \u041f\u041a \u0432 \u043a\u0430\u043a\u043e\u043c-\u043d\u0438\u0431\u0443\u0434\u044c Qt Creator<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438\u0437 \u043d\u0430\u0431\u043e\u0440\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0433\u0440\u0443\u043f\u043f\u044b, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0433\u0440\u0443\u043f\u043f \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c \u0432\u0438\u0434\u0435<\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u041f\u0417\u0423 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0423\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u2013 \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 3 \u0431\u0430\u0439\u0442, \u043e\u043d \u0438 \u0432 \u041f\u0417\u0423 \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c 3 \u0431\u0430\u0439\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0423\u0434\u043e\u0431\u043d\u044b\u0439 API \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445. \u0426\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439, \u0441\u0442\u0440\u043e\u043a\u0438 + \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u043b\u0438\u0447\u0438\u0435 callback \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443<\/p>\n<\/li>\n<li>\n<p>\u044f\u0437\u044b\u043a \u0421 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0447\u0438\u0441\u0442\u043e C \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u0443\u043b\u0430\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u0412 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u043b\u0435\u0436\u0438\u0442 \u0434\u0440\u0435\u0432\u043e\u0432\u0438\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432 \u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0431\u0430\u0439\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u044b \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0434\u0435\u0440\u0435\u0432\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u044b<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u044b \u0434\u0435\u0440\u0435\u0432\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u043d\u0435\u043a\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u041e\u0417\u0423, \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u2013 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043e\u0437\u0436\u0435<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u044b, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0435\u0441\u044f \u043d\u0438\u0436\u0435 \u043f\u043e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 (\u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u0443\u0437\u0435\u043b)<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043f\u043e \u0432\u0435\u0442\u0432\u044f\u043c \u0434\u0435\u0440\u0435\u0432\u0430, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0435\u0442\u0432\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u041e\u0417\u0423 \u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u041f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430. \u041f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u2013 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0432\u0441\u0435. \u041d\u0430 \u044d\u0442\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435 \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430 \u044d\u0442\u043e\u043c \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c. \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0434\u0435\u0442\u0430\u043b\u044f\u0445, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c \u0442\u0438\u043f\u044b \u0443\u0437\u043b\u043e\u0432:<\/p>\n<pre><code class=\"cpp\">\/\/ Node type typedef enum {     sNode,          \/\/ Simple (terminating) node     hNode,          \/\/ Hierarchy node     lNode,          \/\/ List node } nodeType; <\/code><\/pre>\n<p>sNode \u2013 (\u0441\u043e\u043a\u0440. Simple node) \u044d\u0442\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u0437\u0435\u043b. hNode (hierarchy node) \u2013 \u0443\u0437\u0435\u043b, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439 \u0432 \u0441\u0435\u0431\u044f \u0443\u0437\u043b\u044b \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 (\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430). lNode \u2013 \u0443\u0437\u0435\u043b, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439 \u0432 \u0441\u0435\u0431\u044f \u0443\u0437\u043b\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 (\u043c\u0430\u0441\u0441\u0438\u0432). \u0418\u043c\u0435\u044f \u044d\u0442\u0438 \u0442\u0440\u0438 \u0442\u0438\u043f\u0430, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043a\u043e\u043b\u044c \u0443\u0433\u043e\u0434\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e. \u041f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 (\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u043e-\u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f, \u043d\u043e \u043e\u043d\u0438 \u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u043b\u044f \u043f\u0443\u0449\u0435\u0439 \u044f\u0441\u043d\u043e\u0441\u0442\u0438):<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/986\/eb0\/552\/986eb055217e6101acdf53c68e1b35d7.png\" width=\"379\" height=\"662\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/986\/eb0\/552\/986eb055217e6101acdf53c68e1b35d7.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u043a \u043d\u0438\u043c. \u0414\u0435\u0440\u0435\u0432\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u04100, \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0438 \u0443\u0437\u043b\u0430 \u2013 B0, B1 \u0438 B2. \u0418\u0437 \u043d\u0438\u0445 B2 \u2013 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u0437\u0435\u043b, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0443\u0437\u043b\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0431\u044f. B0 \u2013 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u0443\u0437\u0435\u043b \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438, B1 \u2013 \u0442\u043e\u0436\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439, \u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438. \u0423\u0437\u043b\u044b C \u2013 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0443\u0437\u043b\u0443 C25, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432 (1, 5), \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u043a\u043e\u0440\u043d\u044f. \u0412\u0440\u043e\u0434\u0435 \u043d\u0435 rocket science, \u0435\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0443\u0437\u043b\u0430\u043c\u0438 \u0434\u0435\u0440\u0435\u0432\u0430 \u0443 \u043d\u0430\u0441 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u044b. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043e\u0431\u0449\u0438\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0435\u0439:<\/p>\n<pre><code class=\"cpp\">#define GENERIC_NODE_PATTERN            nodeType type;  \\                                         uint32_t ramOffset;     \/* Used by hNode for fast indexed access *\/  \\                                         uint32_t romOffset; \/\/ Generic node descriptor struct node_t {     GENERIC_NODE_PATTERN }; <\/code><\/pre>\n<p>\u0423 \u043b\u044e\u0431\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u0435\u0441\u0442\u044c \u0442\u0438\u043f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u041e\u0417\u0423 \u0438 \u0432 \u041f\u0417\u0423. \u042d\u0442\u043e \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043c\u044b \u0440\u0443\u043a\u0430\u043c\u0438 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0438\u043d\u0430\u0447\u0435 \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u044c \u0441\u043c\u044b\u0441\u043b. \u041e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. <\/p>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0443\u0437\u043b\u0430 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 (hNode):<\/p>\n<pre><code class=\"cpp\">\/\/ Hierarchy node descriptor struct hNode_t {     \/\/ Common     GENERIC_NODE_PATTERN     \/\/ Custom     uint16_t hListSize;             \/\/ Child list size     struct node_t **hList;          \/\/ List of child node descriptors }; <\/code><\/pre>\n<p> \u0412 hNode \u0432\u0445\u043e\u0434\u044f\u0442 \u043e\u0431\u0449\u0438\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u043e\u0432 \u043f\u043e\u043b\u044f (\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0432\u0435\u0440\u043d\u043e, \u0442\u0430\u043a\u043e\u0435 \u0432\u043e\u0442 \u00ab\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u00bb \u0432 \u0421), \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0441\u043f\u0438\u0441\u043e\u043a. \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 \u043c\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c. <\/p>\n<p>\u041d\u0443 \u0438 \u043c\u0430\u0441\u0441\u0438\u0432 lNode:<\/p>\n<pre><code class=\"cpp\">\/\/ List node descriptor struct lNode_t {     \/\/ Common     GENERIC_NODE_PATTERN     \/\/ Custom     uint16_t hListSize;             \/\/ Count of child elements (all elements are equal)     struct node_t *element;         \/\/ Child node descriptor (since all are equal, single descriptor is used)     uint32_t elementRamSize;     uint32_t elementRomSize; }; <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (\u043e\u043d\u0438 \u0432\u0441\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440), \u0440\u0430\u0437\u043c\u0435\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u041e\u0417\u0423 \u0438 \u0432 \u041f\u0417\u0423. \u0422\u0443\u0442 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u044f\u0441\u043d\u0438\u0442\u044c, \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u041e\u0417\u0423 \u0438 \u041f\u0417\u0423. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c, \u043d\u043e \u0438\u0445 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u041f\u0417\u0423. \u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 (\u0445\u043e\u0442\u044f, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0443\u0434\u0430\u0447\u043d\u044b\u0439) \u043f\u0440\u0438\u043c\u0435\u0440 \u2013 \u0432\u0435\u0440\u0441\u0438\u044f \u041f\u041e. \u041d\u0430 \u0442\u0430\u043a\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0430\u0433\u043e\u0446\u0435\u043d\u043d\u043e\u0435 \u041f\u0417\u0423 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c. \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0443 sNode, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0449\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c, \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u0445 \u0442\u0438\u043f\u0430. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0434\u043b\u044f \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0438 \u0441\u0442\u0440\u043e\u043a. \u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c.<\/p>\n<pre><code class=\"cpp\">struct u32Prm_t {     uint32_t defaultValue;     uint32_t minValue;     uint32_t maxValue; };   struct charArrayPrm_t {     const char *defaultValue; }; <\/code><\/pre>\n<p>\u0414\u043b\u044f \u0446\u0435\u043b\u044b\u0445 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u0441\u0442\u0440\u043e\u043a \u0438 \u0442\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u2013 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430:<\/p>\n<pre><code class=\"cpp\">\/\/ Simple (terminating) node descriptor struct sNode_t {     \/\/ Common     GENERIC_NODE_PATTERN     \/\/ Custom     uint32_t size;     uint8_t accessLevel;     storageType storage;     onChangeCallback changeCallback;     requestHandler rqHandler;     union {         struct u32Prm_t u32Prm;         struct charArrayPrm_t charArrayPrm;     \/\/ not 0-terminated     } varData; }; <\/code><\/pre>\n<p>\u0423 \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0435\u0441\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0432 \u0431\u0430\u0439\u0442\u0430\u0445 (size), \u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f (\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043e\u043d \u0432 \u041f\u0417\u0423 \u0438\u043b\u0438 \u043d\u0435\u0442), callback \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0435. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0443\u0440\u043e\u0432\u043d\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u2013 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \/ \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \/ whatever. \u041f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 \u043d\u0435\u0441\u0430\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041d\u0443 \u0438 \u0441\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439 \u0442\u0438\u043f \u0438 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u041e\u0417\u0423 \/ \u041f\u0417\u0423.<\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u043e, \u0441 \u044d\u0442\u0438\u043c \u0442\u043e\u0436\u0435 \u0432\u0440\u043e\u0434\u0435 \u0432\u0441\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0418\u0437 \u044d\u0442\u0438\u0445 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432 \u043c\u044b \u0432\u044b\u0441\u0442\u0440\u043e\u0438\u043c \u0434\u0435\u0440\u0435\u0432\u043e \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u0438\u043f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u2013 \u0447\u0442\u0435\u043d\u0438\u0435 \/ \u0437\u0430\u043f\u0438\u0441\u044c \/ \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f, \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0435. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0434\u0435\u0440\u0435\u0432\u0443, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043a\u043e\u0440\u043d\u044f, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0435\u0440\u0435\u0432\u0430. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438 \u0432\u0435\u0440\u043d\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0421\u0435\u0439\u0447\u0430\u0441 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u041e\u0417\u0423 (\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u043b\u0435\u0436\u0430\u0442 \u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435) \u0438 \u043a\u0430\u043a \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0438\u0445 \u0441 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430\u043c\u0438 (\u0437\u0430\u0434\u0430\u0442\u044c \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f). \u0421 sNode \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u2013 \u0435\u0441\u0442\u044c \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0438 \u043b\u0435\u0436\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 &#8212; \u0431\u0435\u0440\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439. \u0412\u0435\u0440\u043d\u0435\u0435, \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0442\u0430\u043a. \u041a\u043e\u0433\u0434\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043e\u0445\u043e\u0434\u0438\u0442 \u0434\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430, \u0443 \u043d\u0435\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441. \u0412\u043e\u0442 \u0434\u043b\u044f \u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c. \u0410 \u043a\u0430\u043a \u0431\u044b\u0442\u044c \u0441 hNode \u0438 lNode? \u041d\u0443\u0436\u043d\u043e \u0435\u0449\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432\u2026 \u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u044b\u0448\u043b\u0435\u043d\u0438\u044f \u044f \u043f\u0440\u0438\u0448\u0435\u043b \u043a \u0442\u0430\u043a\u043e\u0439 \u0444\u043e\u0440\u043c\u0435:<\/p>\n<ul>\n<li>\n<p>\u0426\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u043e\u0439 CRC16, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f hNode \u0438\u043b\u0438 lNode \u043f\u043e \u0432\u0441\u0435\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u0443\u0437\u043b\u0430\u043c, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0432 \u043d\u0435\u0433\u043e (\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043d\u0438\u043c \u2013 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0443\u0437\u043b\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0441\u0447\u0435\u0442\u0435 CRC \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430). CRC16 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c, \u043d\u043e \u043d\u0438\u0447\u0442\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c CRC32 \u0438\u043b\u0438 \u0441\u0443\u043c\u043c\u0443 \u0424\u043b\u0435\u0442\u0447\u0435\u0440\u0430 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0438\u043f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f hNode \u0438\u043b\u0438 lNode \u0432 \u041e\u0417\u0423 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430 CRC16, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0441\u0435\u0445 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438, \u043f\u0443\u0441\u0442\u044c \u0434\u0430\u0436\u0435 \u043e\u043d\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0434\u0435\u0440\u0435\u0432\u0435 \u0441 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0441\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0443\u0437\u043b\u044b, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 hNode, \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043d\u043e \u0443\u0436\u0435 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u043e\u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0435\u0440\u0435\u0432\u0430. \u041f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u043e\u0439\u0434\u0435\u0442 \u0432\u0441\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0438 \u0432\u0441\u0435\u043c \u0443\u0437\u043b\u0430\u043c \u0437\u0430\u0434\u0430\u0441\u0442 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435. \u041f\u043e\u0442\u043e\u043c, \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e \u0443\u0437\u043b\u0430\u043c \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f, \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u0432 \u0438\u0442\u043e\u0433\u0435 \u043d\u0443\u0436\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u043a\u0430\u0440\u0442\u0443 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0434\u0435\u0440\u0435\u0432\u0430 \u0432\u044b\u0448\u0435:<\/p>\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/d7f\/0b8\/0e2\/d7f0b80e2080e472dfbf65f5f8277487.jpg\" width=\"511\" height=\"66\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d7f\/0b8\/0e2\/d7f0b80e2080e472dfbf65f5f8277487.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043f\u0435\u0440\u0432\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0434\u0435\u0440\u0435\u0432\u0430 \u0432\u0445\u043e\u0434\u044f\u0442 \u0443\u0437\u043b\u044b B0, B1 \u0438 B2. \u0418\u0437 \u043d\u0438\u0445 B0 \u0438 B1 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435. \u0417\u043d\u0430\u0447\u0438\u0442, \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0437\u043b\u0430 B2. \u0410 \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0443\u0437\u043b\u044b B0 \u0438 B1 \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e. \u041f\u0440\u043e\u0445\u043e\u0434\u044f \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u0441\u0435 \u0434\u0435\u0440\u0435\u0432\u043e, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u043f\u0430\u043c\u044f\u0442\u0438 (\u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f) \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u043e\u0432 \u0434\u0435\u0440\u0435\u0432\u0430. \u042d\u0442\u0438 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u043b\u044f \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432 \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0438\u0445 \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u043b\u043e\u043a-\u0441\u0445\u0435\u043c\u0443 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443. \u0421\u0440\u0430\u0437\u0443 \u043a\u043e\u0434.<\/p>\n<details class=\"spoiler\">\n<summary>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">resultType initNode(node_t *node, uint32_t *ramSize, uint32_t *romSize, nodeInitContext_t *ctx) {     hNode_t *hnode;     lNode_t *lnode;     sNode_t *snode;     uint16_t i;     uint32_t ramOffset = 0;     uint32_t romOffset = 0;     uint32_t nodeRamSize, nodeRomSize;     ctx->depth++;     if (ctx->depth > ctx->maxDepth)     {         ctx->maxDepth = ctx->depth;         if (ctx->maxDepth > ctx->maxAllowedDepth)         {             SETTINGS_ASSERT_NEVER_EXECUTE();             *ramSize = 0;             *romSize = 0;             return Result_DepthExceeded;         }     }     switch (node->type)     {         case hNode:             hnode = (hNode_t *)node;              \/\/ First few bytes are used by CRC             ramOffset += NODE_CRC_SIZE;             romOffset += NODE_CRC_SIZE;              \/\/ Init terminating nodes             for (i=0; i&lt;hnode->hListSize; i++)             { #if ERROR_ON_UNITIALIZED_NODE == 1                 SETTINGS_ASSERT_TRUE(hnode->hList[i]); #else                 if (hnode->hList[i] == 0)                     continue; #endif                 if (hnode->hList[i]->type == sNode)                 {                     initNode(hnode->hList[i], &amp;nodeRamSize, &amp;nodeRomSize, ctx);                     hnode->hList[i]->ramOffset = ramOffset;                     hnode->hList[i]->romOffset = romOffset;                     ramOffset += nodeRamSize;                     romOffset += nodeRomSize;                 }             }              \/\/ Here ROM offset may be page-aligned for hierarchy nodes if necessary             \/\/ Init hierarchy nodes             for (i=0; i&lt;hnode->hListSize; i++)             {                 if (hnode->hList[i] == 0)                     continue;                 if ((hnode->hList[i]->type == hNode) || (hnode->hList[i]->type == lNode))                 {                     initNode(hnode->hList[i], &amp;nodeRamSize, &amp;nodeRomSize, ctx);                     hnode->hList[i]->ramOffset = ramOffset;                     hnode->hList[i]->romOffset = romOffset;                     \/\/ Here ROM offset may be page-aligned for hierarchy nodes if necessary                     ramOffset += nodeRamSize;                     romOffset += nodeRomSize;                 }             }              \/\/ Return used amount of RAM and ROM             *ramSize = ramOffset;             *romSize = romOffset;             break;          case lNode:             lnode = (lNode_t *)node;              \/\/ First few bytes are used by CRC             ramOffset += NODE_CRC_SIZE;             romOffset += NODE_CRC_SIZE;              initNode(lnode->element, &amp;nodeRamSize, &amp;nodeRomSize, ctx);             lnode->element->ramOffset = ramOffset;             lnode->element->romOffset = romOffset;             lnode->elementRamSize = nodeRamSize;             lnode->elementRomSize = nodeRomSize;             \/\/ Here ROM offset may be page-aligned for hierarchy nodes if necessary             ramOffset += nodeRamSize * lnode->hListSize;             romOffset += nodeRomSize * lnode->hListSize;              \/\/ Return used amount of RAM and ROM             *ramSize = ramOffset;             *romSize = romOffset;             break;          case sNode:             snode = (sNode_t *)node;             \/\/ Return used amount of RAM and ROM             *ramSize = snode->size;             *romSize = (snode->storage == RomStored) ? snode->size : 0;             break;          default:             SETTINGS_ASSERT_NEVER_EXECUTE();             break;     }     ctx->depth--;     return Result_OK; } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u0430\u044f, \u0434\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0433\u043b\u0443\u0431\u0438\u043d\u044b (\u0447\u0438\u0442\u0430\u0439, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432) \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0434\u0435\u0440\u0435\u0432\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430:<\/p>\n<pre><code class=\"cpp\">\/\/ Node init context data struct nodeInitContext_t {     uint32_t depth;             \/\/ Current depth for a node     uint32_t maxDepth;          \/\/ Maximum depth for whole tree     uint32_t maxAllowedDepth;   \/\/ Maximum alowed depth (if maxDepth esceeds this value, error is generated) }; <\/code><\/pre>\n<p>\u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0443\u0437\u043b\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u0434\u0435\u0440\u0435\u0432\u0430 (\u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0443\u0437\u043b\u0430 \u04100), \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u041e\u0417\u0423 \u0438 \u041f\u0417\u0423 (\u0434\u0430, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0445 \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0432 nodeInitContext_t, \u043d\u043e \u0442\u0430\u043a \u0443\u0436 \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c) \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"cpp\">nodeInitContext_t ctx;  \/\/ Create RAM and ROM map for the whole tree ctx.depth = 0; ctx.maxDepth = 0; ctx.maxAllowedDepth = 10; \/\/ InitNode is first initialization stage, it does not actualy use RAM or ROM, only tree structure is created initNode((node_t *)hRoot, &amp;ramSize, &amp;romSize, &amp;ctx); SETTINGS_ASSERT_TRUE(ramSize &lt;= SETTINGS_RAM_SIZE); hRoot->ramOffset = 0;       \/\/ Start address for RAM hRoot->romOffset = 0;       \/\/ Start address for ROM  SETTINGS_DEBUG(\"Settings total RAM: %d, ROM %d bytes, depth %d\\n\", ramSize, romSize, ctx.maxDepth); <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a\u0430\u0440\u0442\u0430 \u043f\u0430\u043c\u044f\u0442\u0438 \u0440\u0430\u0437\u043c\u0435\u0447\u0435\u043d\u0430, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0438 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u043c\u044b \u0441\u043d\u043e\u0432\u0430 \u043f\u0440\u043e\u0431\u0435\u0433\u0430\u0435\u043c \u043f\u043e \u0434\u0435\u0440\u0435\u0432\u0443, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 (\u0437\u0434\u0435\u0441\u044c \u0438\u0434\u0435\u0442 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0435 \u0447\u0442\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u041f\u0417\u0423). \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0437\u043b\u043e\u0432 \u0432 hNode \u0432\u0430\u043b\u0438\u0434\u043d\u044b, \u0432 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430. \u0415\u0441\u043b\u0438 \u043e\u043d\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442, \u0442\u043e \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e, \u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 hNode \u0432\u0430\u043b\u0438\u0434\u043d\u044b. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u0443\u044e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0443\u043c\u043c\u0443 \u0432 \u041f\u0417\u0423 \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0430\u0440\u043e\u0439. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0422\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0441\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c \u0437\u0430\u0434\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0443\u043c\u043c\u0443. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e.<\/p>\n<details class=\"spoiler\">\n<summary>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">resultType validateNode(node_t *node, uint32_t nodeRamBase, uint32_t nodeRomBase, uint8_t useDefaults) {     hNode_t *hnode;     lNode_t *lnode;     sNode_t *snode;     uint16_t i;     uint32_t ramAddr, romAddr;     resultType result, nodeResult, snodeResult;     resultType crcCheckResult;     switch (node->type)     {         case hNode:             hnode = (hNode_t *)node;             result = Result_OK;             snodeResult = Result_OK;              \/\/ Run through all nodes, check if values are valid             for (i=0; i&lt;hnode->hListSize; i++)             { #if ERROR_ON_UNITIALIZED_NODE == 1                 SETTINGS_ASSERT_TRUE(hnode->hList[i]); #else                 if (hnode->hList[i] == 0)                     continue; #endif                 pushArg(argHistory, SETTINGS_MAX_DEPTH, i);                 ramAddr = nodeRamBase + hnode->hList[i]->ramOffset;                 romAddr = nodeRomBase + hnode->hList[i]->romOffset;                 nodeResult = validateNode(hnode->hList[i], ramAddr, romAddr, useDefaults);                 popArg(argHistory, SETTINGS_MAX_DEPTH);                 if (hnode->hList[i]->type == sNode)                     snodeResult = (resultType)(snodeResult | nodeResult);                 else                     result = (resultType)(result | nodeResult);             }              if (useDefaults)             {                 \/\/ All nodes have been restored already. Update hnode CRC                 updateNodeCRC((node_t *)hnode, nodeRamBase, nodeRomBase);                 result = (resultType)(result | Result_UpdatedRom);             }             else             {                 if (snodeResult == Result_OK)                 {                     \/\/ All snodes are valid. Restore and check hnode CRC                     readRom(nodeRamBase, nodeRomBase, NODE_CRC_SIZE);                     crcCheckResult = checkNodeCRC((node_t *)hnode, nodeRamBase);                 }                 if ((snodeResult != Result_OK) || (crcCheckResult != Result_OK))                 {                     \/\/ Run through snodes again, force defaults                     for (i=0; i&lt;hnode->hListSize; i++)                     {                         if (hnode->hList[i]->type != sNode)                             continue;                         pushArg(argHistory, SETTINGS_MAX_DEPTH, i);                         ramAddr = nodeRamBase + hnode->hList[i]->ramOffset;                         romAddr = nodeRomBase + hnode->hList[i]->romOffset;                         nodeResult = validateNode(hnode->hList[i], ramAddr, romAddr, 1);                         popArg(argHistory, SETTINGS_MAX_DEPTH);                     }                     \/\/ Update hnode CRC                     updateNodeCRC((node_t *)hnode, nodeRamBase, nodeRomBase);                     result = (resultType)(result | Result_UpdatedRom);                 }             }             break;          case lNode:             lnode = (lNode_t *)node;             result = Result_OK;             snodeResult = Result_OK;              \/\/ Run through all nodes, check if values are valid             for (i=0; i&lt;lnode->hListSize; i++)             {                 \/\/ Here ROM offset may be page-aligned for hierarchy nodes if necessary                 pushArg(argHistory, SETTINGS_MAX_DEPTH, i);                 ramAddr = nodeRamBase + lnode->element->ramOffset + (lnode->elementRamSize * i);                 romAddr = nodeRomBase + lnode->element->romOffset + (lnode->elementRomSize * i);                 nodeResult = validateNode(lnode->element, ramAddr, romAddr, useDefaults);                 popArg(argHistory, SETTINGS_MAX_DEPTH);                 if (lnode->element->type == sNode)                     snodeResult = (resultType)(snodeResult | nodeResult);                 else                     result = (resultType)(result | nodeResult);             }              if (useDefaults)             {                 \/\/ All nodes have been restored already. Update lnode CRC                 updateNodeCRC((node_t *)lnode, nodeRamBase, nodeRomBase);                 result = (resultType)(result | Result_UpdatedRom);             }             else             {                 if (snodeResult == Result_OK)                 {                     \/\/ All snodes are valid. Restore and check lnode CRC                     readRom(nodeRamBase, nodeRomBase, NODE_CRC_SIZE);                     crcCheckResult = checkNodeCRC((node_t *)lnode, nodeRamBase);                 }                 if ((snodeResult != Result_OK) || (crcCheckResult != Result_OK))                 {                     for (i=0; i&lt;lnode->hListSize; i++)                     {                         if (lnode->element->type != sNode)                             break;                         \/\/ Here ROM offset may be page-aligned for hierarchy nodes if necessary                         pushArg(argHistory, SETTINGS_MAX_DEPTH, i);                         ramAddr = nodeRamBase + lnode->element->ramOffset + (lnode->elementRamSize * i);                         romAddr = nodeRomBase + lnode->element->romOffset + (lnode->elementRomSize * i);                         nodeResult = validateNode(lnode->element, ramAddr, romAddr, 1);                         popArg(argHistory, SETTINGS_MAX_DEPTH);                     }                     \/\/ Update hnode CRC                     updateNodeCRC((node_t *)lnode, nodeRamBase, nodeRomBase);                     result = (resultType)(result | Result_UpdatedRom);                 }             }             break;          case sNode:             snode = (sNode_t *)node;             SETTINGS_ASSERT_TRUE(snode->rqHandler != 0);             result = snode->rqHandler((useDefaults) ? rqRestoreDefault : rqRestoreValidate, snode, nodeRamBase, nodeRomBase, 0);             break;          default:             SETTINGS_ASSERT_NEVER_EXECUTE();             result = Result_UnknownNodeType;             break;     }     return result; } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0412\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u044b \u0435\u0435 \u0431\u0443\u0434\u0435\u043c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">    \/\/ Validate values and check CRC     result = validateNode((node_t *)hRoot, hRoot->ramOffset, hRoot->romOffset, useDefaults);     SETTINGS_DEBUG(\"Validate result 0x%02X %s\\n\", result, (result &amp; Result_UpdatedRom) ? \"(defaults restored)\" : \"\"); <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0435\u0449\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0432\u043e\u0442 \u043d\u0430 \u0447\u0442\u043e. \u041c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c callback-\u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043a, \u0447\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 callback \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u041d\u043e \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u043d\u0430\u0442\u044c, \u0441 \u043a\u0430\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u043e\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u0434\u0435\u043b\u043e \u0438 \u043a\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e. \u042f \u0440\u0435\u0448\u0438\u043b \u043d\u0435 \u043c\u0435\u043b\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043f\u043e \u0434\u0435\u0440\u0435\u0432\u0443 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 argHistory, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 union callbackCache. Callback \u0437\u043d\u0430\u0435\u0442 \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430  \u0435\u0433\u043e \u0432\u044b\u0437\u0432\u0430\u043b\u0438 \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0442\u0438\u043f callbackCache.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0441 \u0434\u0435\u0440\u0435\u0432\u043e\u043c \u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u0432\u0441\u0435. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0434\u0432\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0430\u043c\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0442\u0438\u043f\u043e\u0432 \u2013 \u0446\u0435\u043b\u043e\u0433\u043e 32-\u0431\u0438\u0442\u043e\u0432\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0438 \u0441\u0442\u0440\u043e\u043a.<\/p>\n<details class=\"spoiler\">\n<summary>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043b\u044f 32-\u0431\u0438\u0442\u043d\u044b\u0445 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">validateResult validateU32(uint32_t value, struct u32Prm_t *prm) {     return ((prm->minValue &lt;= value) &amp;&amp; (value &lt;= prm->maxValue)) ? ValidateOk : ValidateErr; }   resultType handleRequestU32(rqType rq, struct sNode_t *pNode, uint32_t nodeRamBase, uint32_t nodeRomBase, request_t *rqst) {     resultType result = Result_OK;     uint32_t val32;     uint32_t *pVal32;     \/\/SETTINGS_DEBUG(\"U32 node rq %d, node size %d, ram %d, rom %d\", rq, pNode->size, nodeRamBase, nodeRomBase);     switch (rq)     {         case rqRead:             if (rqst->raw)             {                 memcpy(rqst->raw, &amp;ram[nodeRamBase], pNode->size);             }             else             {                 pVal32 = (uint32_t *)rqst->val.i32;                 bytesToU32MsbFirst(&amp;ram[nodeRamBase], &amp;val32, pNode->size);                 *pVal32 = val32;             }             break;          case rqApplyNoCb:         case rqApply:         case rqStore:         case rqWriteNoCb:         case rqWrite:             if (rqst->raw)             {                 \/\/ Serialize to validate                 bytesToU32MsbFirst(rqst->raw, &amp;val32, pNode->size);             }             else             {                 pVal32 = (uint32_t *)rqst->val.i32;                 val32 = *pVal32;             }             if (rq &amp; rqApply)             {                 if (validateU32(val32, &amp;pNode->varData.u32Prm) == ValidateOk)                 {                     u32toBytesMsbFirst(&amp;val32, &amp;ram[nodeRamBase], pNode->size);                     \/\/ Request arguments may be provided by GetRequestArg() if required by callback                     \/\/ New value may be directly obtained using GetCallbackCache() if required by callback                     callbackCache.i32 = val32;                     if (pNode->changeCallback)                         pNode->changeCallback(rq, argHistory[0]);                 }                 else                 { #if ERROR_ON_VALIDATE_FAILED == 1                     SETTINGS_ASSERT_NEVER_EXECUTE(); #endif                     result = Result_ValidateError;                     break;                 }             }             if (rq &amp; rqStore)             {                 if (pNode->storage == RomStored)                 {                     writeRom(nodeRomBase, nodeRamBase, pNode->size);                     result = (resultType)(result | Result_UpdatedRom);                 }             }             break;          case rqValidate:             if (rqst->raw)             {                 \/\/ Serialize to validate                 bytesToU32MsbFirst(rqst->raw, &amp;val32, pNode->size);             }             else             {                 pVal32 = (uint32_t *)rqst->val.i32;                 val32 = *pVal32;             }             result = (validateU32(*pVal32, &amp;pNode->varData.u32Prm) == ValidateOk) ? Result_OK : Result_ValidateError;             break;          case rqGetMin:             if (rqst->raw)             {                 u32toBytesMsbFirst(&amp;pNode->varData.u32Prm.minValue, rqst->raw, pNode->size);             }             else             {                 pVal32 = (uint32_t *)rqst->val.i32;                 *pVal32 = pNode->varData.u32Prm.minValue;             }             break;          case rqGetMax:             if (rqst->raw)             {                 u32toBytesMsbFirst(&amp;pNode->varData.u32Prm.maxValue, rqst->raw, pNode->size);             }             else             {                 pVal32 = (uint32_t *)rqst->val.i32;                 *pVal32 = pNode->varData.u32Prm.maxValue;             }             break;          case rqGetSize:             if (rqst->raw)             {                 u32toBytesMsbFirst(&amp;pNode->size, rqst->raw, 4);             }             else             {                 pVal32 = (uint32_t *)rqst->val.i32;                 *pVal32 = pNode->size;             }             break;          case rqRestoreValidate:             if (pNode->storage == RomStored)             {                 readRom(nodeRamBase, nodeRomBase, pNode->size);                 bytesToU32MsbFirst(&amp;ram[nodeRamBase], &amp;val32, pNode->size);                 result = (validateU32(val32, &amp;pNode->varData.u32Prm) == ValidateOk) ? Result_OK : Result_ValidateError;             }             else             {                 val32 = pNode->varData.u32Prm.defaultValue;                 u32toBytesMsbFirst(&amp;val32, &amp;ram[nodeRamBase], pNode->size);             }             break;          case rqRestoreDefault:             val32 = pNode->varData.u32Prm.defaultValue;             u32toBytesMsbFirst(&amp;val32, &amp;ram[nodeRamBase], pNode->size);             if (pNode->storage == RomStored)             {                 writeRom(nodeRomBase, nodeRamBase, pNode->size);                 result = (resultType)(result | Result_UpdatedRom);             }             break;          default:             result = Result_WrongRequestType;             break;     }     return result; } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0418 \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u043a:<\/p>\n<details class=\"spoiler\">\n<summary>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u043a<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">resultType handleRequestCharArray(rqType rq, struct sNode_t *pNode, uint32_t nodeRamBase, uint32_t nodeRomBase, request_t *rqst) {     resultType result = Result_OK;     \/\/SETTINGS_DEBUG(\"Char node rq %d, node size %d, ram %d, rom %d\", rq, pNode->size, nodeRamBase, nodeRomBase);     switch (rq)     {         case rqRead:             memcpy(rqst->raw, &amp;ram[nodeRamBase], pNode->size);             break;          case rqApplyNoCb:         case rqApply:         case rqStore:         case rqWriteNoCb:         case rqWrite:             if (rq &amp; rqApply)             {                 if (rqst->raw != 0)                 {                     memcpy(&amp;ram[nodeRamBase], rqst->raw, pNode->size);                     \/\/ Request arguments may be provided by GetRequestArg() if required by callback                     \/\/ New value may be directly obtained using GetCallbackCache() if required by callback                     callbackCache.str = (char *)rqst->raw;                     \/\/ Request arguments may be provided by GetRequestArg() if required by callback                     if (pNode->changeCallback)                         pNode->changeCallback(rq, argHistory[0]);                 }                 else                 { #if ERROR_ON_VALIDATE_FAILED == 1                     SETTINGS_ASSERT_NEVER_EXECUTE(); #endif                     result = Result_ValidateError;                     break;                 }             }             if (rq &amp; rqStore)             {                 if (pNode->storage == RomStored)                 {                     writeRom(nodeRomBase, nodeRamBase, pNode->size);                     result = (resultType)(result | Result_UpdatedRom);                 }             }             break;          case rqValidate:             \/\/ Char arrays are assumed to be correct             \/\/ If validate is required for specific case, custom request handler should be used             result = (rqst->raw != 0) ? Result_OK : Result_ValidateError;             break;          case rqGetMin:         case rqGetMax:             SETTINGS_ASSERT_NEVER_EXECUTE();             result = Result_WrongRequestType;             break;          case rqGetSize:             if (rqst->raw)             {                 u32toBytesMsbFirst(&amp;pNode->size, rqst->raw, 4);             }             else             {                 uint32_t *pVal32 = (uint32_t *)rqst->val.i32;                 *pVal32 = pNode->size;             }             break;          case rqRestoreValidate:             if (pNode->storage == RomStored)             {                 readRom(nodeRamBase, nodeRomBase, pNode->size);             }             else             {                 if (pNode->varData.charArrayPrm.defaultValue)                     memcpy(&amp;ram[nodeRamBase], pNode->varData.charArrayPrm.defaultValue, pNode->size);                 else                     memset(&amp;ram[nodeRamBase], 0, pNode->size);             }             break;          case rqRestoreDefault:             if (pNode->varData.charArrayPrm.defaultValue)                 memcpy(&amp;ram[nodeRamBase], pNode->varData.charArrayPrm.defaultValue, pNode->size);             else                 memset(&amp;ram[nodeRamBase], 0, pNode->size);             if (pNode->storage == RomStored)             {                 writeRom(nodeRomBase, nodeRamBase, pNode->size);                 result = (resultType)(result | Result_UpdatedRom);             }             break;          default:             result = Result_WrongRequestType;             break;     }     return result; } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0438\u043f\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (\u043d\u0435 \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u044f, \u043f\u0440\u043e\u0434\u0438\u043a\u0442\u043e\u0432\u0430\u043d\u044b \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432):<\/p>\n<pre><code class=\"cpp\">\/\/ Request type typedef enum {     rqRead = 0x00,     rqApplyNoCb = 0x01,     rqApply = 0x03,           \/\/ Update cache only     rqStore = 0x04,           \/\/ Write to ROM only     rqWriteNoCb = (rqStore | rqApplyNoCb),     rqWrite = (rqStore | rqApply),     rqValidate = 0x08,     rqGetMin = 0x10,     rqGetMax = 0x20,     rqGetSize = 0x40,     rqRestoreValidate = 0xFE,     rqRestoreDefault = 0xFF } rqType; <\/code><\/pre>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0432 \u0431\u0430\u0439\u0442\u0430\u0445, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c (\u0432 \u041e\u0417\u0423 \u0438 \u041f\u0417\u0423), \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c (\u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u041e\u0417\u0423), \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0431\u0435\u0437 \u0432\u044b\u0437\u043e\u0432\u0430 callback \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u041f\u0417\u0423.  \u041a\u0430\u043a \u043c\u044b \u0440\u0430\u043d\u0435\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438, \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043c\u043e\u0434\u0443\u043b\u044e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0437\u0430\u043f\u0440\u043e\u0441. \u0421\u0430\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u043a\u0430\u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430:<\/p>\n<pre><code class=\"cpp\">\/\/ Request data structure typedef struct {     rqType rq;     accessLevel accLevel;     uint32_t arg[SETTINGS_MAX_DEPTH];     union {         int32_t *i32;     } val;     uint8_t *raw;                   \/\/ Raw serialized data. If set to non-zero, data must be read or written in raw serialized form                                     \/\/ Char arrays always use raw form.     resultType result;              \/\/ Returned request result } request_t; <\/code><\/pre>\n<p>\u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u043c\u043e\u0434\u0443\u043b\u044e \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0438\u043f \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u043c, \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u043d\u0430\u043c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0441\u0432\u044f\u0437\u0438. \u0421\u0430\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">resultType settingsRequest(request_t *rqst) {     node_t *pNode = (node_t *)hRoot;     hNode_t *nnode = 0;     lNode_t *lnode = 0;     node_t *pHostNode = (node_t *)hRoot;                \/\/ Should be updated before use     uint32_t hostNodeRamOffset = hRoot->ramOffset;      \/\/ Should be updated before use     uint32_t hostNodeRomOffset = hRoot->romOffset;      \/\/ Should be updated before use     uint32_t currArg, argIndex = 0;     uint32_t ramOffset = hRoot->ramOffset;     uint32_t romOffset = hRoot->romOffset;     resultType result = Result_OK;      \/\/ Move through the node tree according to the argument list     while(pNode->type != sNode)     {         if (argIndex >= SETTINGS_MAX_DEPTH - 1)         {             result = Result_DepthExceeded;             break;         }         currArg = rqst->arg[argIndex++];         pushArg(argHistory, SETTINGS_MAX_DEPTH, currArg);         switch(pNode->type)         {             case hNode:                 pHostNode = pNode;                  \/\/ Save hNode for CRC update if required by sNode request handler                 hostNodeRamOffset = ramOffset;      \/\/ Save RAM address                 hostNodeRomOffset = romOffset;      \/\/ Save ROM address                 nnode = (hNode_t *)pNode;                 SETTINGS_ASSERT_TRUE(currArg &lt; nnode->hListSize);                 SETTINGS_ASSERT_TRUE(nnode->hList);                 pNode = nnode->hList[currArg];                 SETTINGS_ASSERT_TRUE(pNode);                 ramOffset += pNode->ramOffset;                 romOffset += pNode->romOffset;                 break;              case lNode:                 pHostNode = pNode;                  \/\/ Save lNode for CRC update if required by sNode request handler                 hostNodeRamOffset = ramOffset;      \/\/ Save RAM address                 hostNodeRomOffset = romOffset;      \/\/ Save ROM address                 lnode = (lNode_t *)pNode;                 SETTINGS_ASSERT_TRUE(currArg &lt; lnode->hListSize);                 pNode = lnode->element;                 SETTINGS_ASSERT_TRUE(pNode);                 ramOffset += lnode->element->ramOffset + lnode->elementRamSize * currArg;                 romOffset += lnode->element->romOffset + lnode->elementRomSize * currArg;                 break;              default:                 SETTINGS_ASSERT_NEVER_EXECUTE();                 result = Result_UnknownNodeType;                 break;         }     }     if (result == Result_OK)     {         \/\/ Terminating node is found         SETTINGS_ASSERT_TRUE(((sNode_t *)pNode)->rqHandler);         result = ((sNode_t *)pNode)->rqHandler(rqst->rq, (sNode_t *)pNode, ramOffset, romOffset, rqst);         if (result &amp; Result_UpdatedRom)         {             \/\/ Hide ROM flag             result = (resultType)(result &amp; ~Result_UpdatedRom);             updateNodeCRC(pHostNode, hostNodeRamOffset, hostNodeRomOffset);         }     }     rqst->result = result;     return result; }  <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u043e \u0441\u0443\u0442\u0438, \u0432 \u043d\u0435\u0439 \u043c\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043f\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u043c \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043d\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432 \u0434\u043e\u0445\u043e\u0434\u0438\u043c \u0434\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0412\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \ud83d\ude42<\/p>\n<p><em>\u041b\u0430\u0434\u043d\u043e, \u0434\u0430\u0432\u0430\u0439 \u0443\u0436\u0435 \u043a\u0430\u043a \u044d\u0442\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f\u2026<\/em><\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432. \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0434\u043e\u0431\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u044b. \u0422\u0438\u043f\u0430 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<pre><code class=\"cpp\">sNode_t *u32Node(uint8_t accessLevel, storageType storage,                        uint32_t minValue, uint32_t maxValue, uint32_t defaultValue,                        onChangeCallback changeCallback) {     sNode_t *node = createSNode(4);     node->rqHandler = handleRequestU32;     node->accessLevel = accessLevel;     node->storage = storage;     node->changeCallback = changeCallback;     node->varData.u32Prm.defaultValue = defaultValue;     node->varData.u32Prm.minValue = minValue;     node->varData.u32Prm.maxValue = maxValue;     return node; } <\/code><\/pre>\n<p>\u0410 sNode \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0430\u0441\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0432\u043e\u0442 \u044d\u0442\u043e\u0433\u043e:<\/p>\n<pre><code class=\"cpp\">sNode_t *createSNode(uint16_t size) {     sNode_t *snode = (sNode_t *)SETTINGS_ALLOCATE(sizeof(sNode_t));     SETTINGS_ASSERT_TRUE(snode != 0);     snode->type = sNode;     snode->size = size;     return snode; } <\/code><\/pre>\n<p>SETTINGS_ALLOCATE \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0439 malloc \u0438\u043b\u0438 \u0436\u0435 \u0447\u0443\u0442\u044c \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0430 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430\u0445 \u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0437\u0430\u0442\u0435\u0439\u043b\u0438\u0432\u044b\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u2013 \u043a\u0442\u043e \u0436\u0435 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u0438\u0437\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u0441\u0432\u043e\u0439 <s>\u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434<\/s> \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0430\u043c\u044f\u0442\u0438:<\/p>\n<pre><code class=\"cpp\">void *settingsAlloc(uint32_t size) {     void *pRam = &amp;allocRam[allocRamAddr];     uint32_t nextAddr = allocRamAddr + size;     if (nextAddr &lt;= allocRamSize)     {         \/\/ OK         allocRamAddr = nextAddr;         memset(pRam, 0, size);     }     else     {         \/\/ Out of memory         pRam = 0;     }     return pRam; } <\/code><\/pre>\n<p>\u0412\u0441\u0435 \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u044b \u0447\u0442\u043e\u0431\u044b \u043b\u0435\u0433\u043a\u043e \u0438 \u043d\u0435\u043f\u0440\u0438\u043d\u0443\u0436\u0434\u0435\u043d\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0442\u0430\u043a\u043e\u043c \u0434\u0443\u0445\u0435:<\/p>\n<pre><code class=\"cpp\">hNode_B0 = createHNode(2); addToHList(hNode_B0, 0,           u32Node (  AccessByAll,    RomStored,        0,                      100000,                   12345,                onB0ParamsChanged));     \/\/ C0 addToHList(hNode_B0, 1,           u32Node (  AccessByAll,    RomStored,        0,                      144,                         5,                 onB0ParamsChanged));     \/\/ C1  lNode_B1 = createLNode(35, charNode (  AccessByAll,       RomStored,     C2_SIZE,    dfltC2,                  onC2ParamsChanged));    \/\/ C2  hRoot = createHNode(3);             \/\/ A0 addToHList(hRoot, 0, hNode_B0); addToHList(hRoot, 1, lNode_B1); addToHList(hRoot, 2, u16Node (  AccessByAll,    NotRomStored,      1,                      1024,                  16,                     0));   \/\/ B2  <\/code><\/pre>\n<p>\u0418 \u0432\u0441\u0435 \u0431\u044b \u043d\u0438\u0447\u0435\u0433\u043e, \u043d\u043e \u044d\u0442\u0438 \u0440\u044e\u0448\u0435\u0447\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u044a\u0435\u0441\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0439 \u043a\u0443\u0441\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438 (\u0438 \u0442\u0430\u043a\u0438 \u0441\u044a\u0435\u043b\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0433\u0434\u0435 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043b\u043e\u0445\u043e), \u0442\u0430\u043a \u0447\u0442\u043e \u044f \u0438\u0445 \u0432\u044b\u043d\u0435\u0441 \u043f\u043e\u0434 \u0443\u0441\u043b\u043e\u0432\u043d\u0443\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e ENABLE_NODE_CONSTRUCTORS \u0438 \u0437\u0430\u043f\u0430\u0441\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0438\u0445 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043c\u0430\u043a\u0440\u043e\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438:<\/p>\n<pre><code class=\"cpp\">#define u32Node(accs, stor, min, max, dflt, callback)   \\     {.type = sNode, .ramOffset = 0, .romOffset = 0, .size = 4, .accessLevel = accs, .storage = stor, .changeCallback = callback, .rqHandler = handleRequestU32, \\     .varData.u32Prm = {.defaultValue = dflt, .minValue = min, .maxValue = max}} <\/code><\/pre>\n<p>\u0438 <\/p>\n<pre><code class=\"cpp\">#define charNode(accs, stor, sz, dflt, callback)   \\     {.type = sNode, .ramOffset = 0, .romOffset = 0, .size = sz, .accessLevel = accs, .storage = stor, .changeCallback = callback, .rqHandler = handleRequestCharArray, \\     .varData.charArrayPrm = {.defaultValue = dflt}} <\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0448\u0435 (\u043f\u0443\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 C2_NODES_COUNT \u0448\u0442\u0443\u043a \u0443\u0437\u043b\u043e\u0432 C2), \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u0438\u0445 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432:<\/p>\n<pre><code class=\"cpp\">\/\/ Integer node:                       Access type     Storage type    Minimum                 Maximum                 Default                 Callback \/\/ b0param_C0 static sNode_t node_C0 = u32Node (  AccessByAll,    RomStored,        0,                      100000,                   12345,                onB0ParamsChanged    ); \/\/ b0param_C1 static sNode_t node_C1 = u8Node  (  AccessByAll,    RomStored,        0,                      144,                         5,                 onB0ParamsChanged    );  \/\/ root static node_t *hNodes_B0[b0param_Count] = {(node_t *)&amp;node_C0, (node_t *)&amp;node_C1}; static hNode_t hNode_B0 = hNode(hNodes_B0);  \/\/ b1param_C2i \/\/ Char node:                          Access type     Storage type    Size        Default                 Callback static sNode_t node_C2 = charNode (  AccessByAll,       RomStored,     C2_SIZE,    dfltC2,                  onC2ParamsChanged    ); static lNode_t lNode_B1 = lNode(C2_NODES_COUNT, (node_t *)&amp;node_C2);  \/\/ Integer node:                   Access type     Storage type    Minimum                 Maximum                 Default                 Callback static sNode_t node_B2 = u16Node ( AccessByAll,    NotRomStored,      1,                      1024,                  16,                     0           );  \/\/ Root (A0) static node_t *hNodes_A0[pGroup_Count] = {(node_t *)&amp;hNode_B0, (node_t *)&amp;lNode_B1, (node_t *)&amp;node_B2}; static hNode_t hNode_A0 = hNode(hNodes_A0); hNode_t *hRoot = &amp;hNode_A0; <\/code><\/pre>\n<p>\u041d\u0435 \u043e\u0447\u0435\u043d\u044c \u043b\u0430\u043a\u043e\u043d\u0447\u0438\u043d\u043e, \u043d\u043e \u0447\u0442\u043e \u043f\u043e\u0434\u0435\u043b\u0430\u0442\u044c &#8212; \u0442\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u0430\u043c\u044b\u0439 \u044d\u043a\u043e\u043d\u043e\u043c\u043d\u044b\u0439. <\/p>\n<p><em>\u041a\u0430\u043a \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043a\u043e\u0434\u0430.<\/em> <\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u04210. \u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"cpp\">request_t rq; int32_t val32 = 0; rq.rq = rqRead; rq.arg[0] = 0;\/\/ 0 = B0 rq.arg[1] = 0;\/\/ 0 = C0 rq.val.i32 = &amp;val32; rq.raw = 0; settingsRequest(&amp;rq); if (rq.result == Result_OK) { do_the_job(val32); } <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0438\u0441\u044c 12-\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 C2:<\/p>\n<pre><code class=\"cpp\">request_t rq; int32_t value = 87;\/\/ new value rq.rq = rqWrite; rq.arg[0] = 1;\/\/ B1 rq.arg[1] = 12;\/\/ C2[12] rq.val.i32 = &amp;value; rq.raw = 0; settingsRequest(&amp;rq); if (rq.result == Result_OK) { do_the_job(); } <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 B2:<\/p>\n<pre><code class=\"cpp\">request_t rq; int32_t val32 = 235;\/\/ Value being checked rq.rq = rqValidate; rq.arg[0] = 2;\/\/ 2 = B2 rq.pval.i32 = &amp;val32; SettingsRequest(&amp;rq); if (rq.result == Result_OK) {   do_the_job(); } else if (rq.result == Result_ValidateError) {   handle_error(); } <\/code><\/pre>\n<p>\u0414\u043b\u0438\u043d\u043d\u043e? \u0414\u043b\u0438\u043d\u043d\u043e. \u0422\u0443\u0442 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0440 \u0434\u043b\u044f \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u0438. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u2013 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0438\u043b\u0438 \u0441++ \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u0441 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0412 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0433\u043b\u0443\u0431\u0438\u043d\u0430 \u0434\u0435\u0440\u0435\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0431\u044b\u043b\u0430 \u0440\u0430\u0432\u043d\u0430 4 \u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0442\u0430\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"cpp\">settings_WriteI32_4(pGroup_Sensor, pSensorTempRef, i, 1, 4, (int32_t)temp);<\/code><\/pre>\n<p><em>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043d\u0430\u0447\u0430\u043b\u0443. \u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u041f\u0417\u0423.<\/em><\/p>\n<p>C\u0440\u0435\u0434\u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043a \u041f\u0417\u0423. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043a \u0438 \u0435\u0441\u0442\u044c. \u042f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 &#8212;  \u0435\u0441\u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d NOROM, \u0442\u043e \u0432\u044b\u0437\u043e\u0432\u044b \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0432\u043e\u0432\u0441\u0435 \u0438\u043c\u0438\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438-\u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0430\u043c\u0438. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435, \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0430 \u041f\u041a. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435 \/ \u0437\u0430\u043f\u0438\u0441\u044c \u041f\u0417\u0423. \u041a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412 \u043e\u0434\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0435\u0435\u0441\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0443 \u041f\u0417\u0423, \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u2013 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 \u041e\u0421\u0420\u0412 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c, \u0442\u0430\u043a \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043d\u0435\u043c\u0443 \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0449\u0438\u0442\u0443 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430. <\/p>\n<p><em>\u041f\u043b\u044e\u0441\u044b \u0438 \u043c\u0438\u043d\u0443\u0441\u044b.<\/em><\/p>\n<p>\u041d\u0443 \u0447\u0442\u043e \u0436\u0435, \u0432\u0440\u043e\u0434\u0435 \u0432\u0441\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0446\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u044b. \u0414\u0430\u0432\u0430\u0439\u0442\u0435, \u043e\u0434\u043d\u0430\u043a\u043e, \u0431\u0443\u0434\u0435\u043c \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u044b \u0438 \u043e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043b\u043e\u0445 \u0438\u043b\u0438 \u043d\u0435\u0443\u0434\u043e\u0431\u0435\u043d \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c:<\/p>\n<ul>\n<li>\n<p>\u041d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b. \u0412\u0441\u0435-\u0442\u0430\u043a\u0438, \u0445\u043e\u0442\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0441\u044f \u043a \u041e(n) (\u0433\u0434\u0435 n \u2013 \u044d\u0442\u043e \u0433\u043b\u0443\u0431\u0438\u043d\u0430 \u0434\u0435\u0440\u0435\u0432\u0430), \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043e\u043d\u0438 \u0435\u0441\u0442\u044c. \u041d\u0443 \u0447\u0442\u043e \u0436\u0435, \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u0430\u044f \u0440\u0430\u0441\u043f\u043b\u0430\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f (\u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b). \u0420\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u2013 \u043e\u0431\u0435\u0440\u0442\u043e\u043a.<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u041f\u0417\u0423. \u041c\u043e\u0434\u0443\u043b\u044c \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u041f\u0417\u0423, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u041f\u0417\u0423 \u043c\u043e\u0436\u0435\u0442 \u0443\u043c\u0435\u0442\u044c \u0441\u0442\u0438\u0440\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0442\u043e\u0440, \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0442\u0435\u043d\u0435\u0432\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u0435\u043a\u0442\u043e\u0440\u0430. \u041d\u043e \u044d\u0442\u043e \u0435\u0441\u0442\u044c \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u0412\u043e\u043f\u0440\u043e\u0441 \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0443\u044e \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0443.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043e\u043f\u0443\u0441\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u043e\u0431 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044f \u043d\u0435 \u043c\u043e\u0433\u0443 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u043e\u0435\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0443\u0441\u0442\u0438\u043b \u043a\u043e\u0435-\u043a\u0430\u043a\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u043e \u0432\u043e\u0442 <a href=\"https:\/\/github.com\/Avegawanderer\/settings-module\">\u0441\u0441\u044b\u043b\u043a\u0430<\/a>, \u0433\u0434\u0435 \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438, \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. \u041f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043a\u0430\u043a \u0432\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432.<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/590655\/\"> https:\/\/habr.com\/ru\/articles\/590655\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0412 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0438 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043c\u044b \u0447\u0430\u0441\u0442\u043e \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u042d\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u0430\u043a \u044f\u0440\u043a\u043e\u0441\u0442\u044c \u0434\u0438\u0441\u043f\u043b\u0435\u044f, \u044f\u0437\u044b\u043a, \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0440\u0430\u0434\u0438\u043e\u043a\u0430\u043d\u0430\u043b\u0430 \u0438\u043b\u0438 IP \u0430\u0434\u0440\u0435\u0441 \u2013 \u0434\u0430 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u0415\u0434\u0438\u043d\u043e\u0433\u043e \u043e\u0431\u0449\u0435\u043f\u0440\u0438\u043d\u044f\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435\u0442, \u0438 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u043d\u0438\u0436\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u0438\u0445 \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u043f\u0440\u0438\u0448\u0435\u043b \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438. \u041f\u043e\u0435\u0445\u0430\u043b\u0438!<\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0449\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u041f\u0417\u0423.<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c \u043f\u0438\u0442\u0430\u043d\u0438\u0438 \u043b\u044e\u0434\u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u0438 \u041f\u0417\u0423 (\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0435 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0449\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e). \u0412 \u043c\u0438\u0440\u0435 Embedded \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0435 \u0432 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u041f\u0417\u0423 \u043b\u0438\u0431\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u0435 (\u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0443 \u0438\u043b\u0438 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443) \u041f\u0417\u0423 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u044b, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u043e\u0439 \u043a \u043f\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c SPI \u0438\u043b\u0438 I2C. \u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u041f\u0417\u0423 \u0432 \u043a\u0440\u0435\u043c\u043d\u0438\u0438 \u0442\u0430\u043a\u043e\u0432\u044b, \u0447\u0442\u043e \u0438\u0437 \u041f\u0417\u0423 \u043c\u043e\u0436\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u0430\u0434\u0440\u0435\u0441\u0430\u043c, \u0430 \u0432\u043e\u0442 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0443\u0436\u043d\u043e \u041f\u0417\u0423 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0435\u0440\u0435\u0442\u044c. \u0421\u0442\u0438\u0440\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u044e \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0443 \u0438\u043b\u0438 \u0436\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442. \u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432\u043d\u0443\u0442\u0440\u0438, \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0435\u043a\u0442\u043e\u0440, \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0431\u0430\u0439\u0442. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0432\u0440\u0435\u043c\u044f \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u0430\u0439\u0442\u0430, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0440\u0430\u0432\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0447\u0442\u043e \u043d\u0430\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u0442 \u043d\u0430 \u043c\u044b\u0441\u043b\u044c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0441\u0442\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u044f\u0432\u043d\u043e. \u0412\u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f \u043a\u0430\u043a \u0440\u0430\u0437 \u0441\u0430\u043c\u0430\u044f \u0434\u043e\u043b\u0433\u0430\u044f. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0435 \u0436\u0434\u0430\u043b\u0430 \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 \u041f\u0417\u0423, \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0443\u0445\u0438\u0449\u0440\u0435\u043d\u0438\u044f \u2013 \u043a\u0435\u0448 \u0432 \u041e\u0417\u0423 \u0438 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c.<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0435 \u041f\u0417\u0423, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c, \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0434\u0432\u0443\u043c\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438:<\/p>\n<pre><code class=\"cpp\">eeprom_read(uint32_t address, uint8_t *data, uint32_t count); eeprom_write(uint32_t address, const uint8_t *data, uint32_t count);<\/code><\/pre>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0441 \u043d\u0435 \u0432\u043e\u043b\u043d\u0443\u044e\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u041f\u0417\u0423 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u0435. \u0418\u043c\u0435\u044f \u044d\u0442\u0438 \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0430\u0439\u0442 \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0435\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0435\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u044d\u0442\u043e\u043c \u041f\u0417\u0423 \u0438 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0438\u043c\u0438 (\u0447\u0438\u0442\u0430\u0442\u044c \/ \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c). \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 1. <\/p>\n<pre><code class=\"cpp\">uint8_t param1; uint32_t param2; \/\/ \u0427\u0438\u0442\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u0431\u0430\u0439\u0442 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 0x00 eeprom_read(0x00, &amp;param1, 1); do_the_job1(param1); \/\/ \u0427\u0438\u0442\u0430\u0435\u043c 32-\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 0x01 eeprom_read(0x01, &amp;param2, 4); do_the_job2(param2); \/\/ \u041f\u0438\u0448\u0435\u043c \u043e\u0434\u0438\u043d \u0431\u0430\u0439\u0442 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 0x02 eeprom_write(0x02, (const uint8_t *)&amp;param1, 1); \/\/ \u041f\u0438\u0448\u0435\u043c 32-\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 0x03 eeprom_write(0x03, (const uint8_t *)&amp;param2, 4);<\/code><\/pre>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0430\u043c\u044b\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u043b\u043e\u0445\u043e: <\/p>\n<ul>\n<li>\n<p>\u0410\u0434\u0440\u0435\u0441\u0430 \u0437\u0430\u0445\u0430\u0440\u0434\u043a\u043e\u0436\u0435\u043d\u044b. \u041d\u0443\u0436\u043d\u043e \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0434\u0435 \u043a\u0430\u043a\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043b\u0435\u0436\u0438\u0442 \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043d \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0431\u0430\u0439\u0442. \u041f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0447\u0435\u043d\u044c \u0442\u0440\u0443\u0434\u043d\u043e \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u041f\u0417\u0423 \u043f\u043e \u043a\u043e\u0434\u0443 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u0445\u0440\u0430\u043d\u044f\u0449\u0430\u044f\u0441\u044f \u0432 \u041f\u0417\u0423, \u043d\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u043e\u0432. \u041c\u043e\u0436\u043d\u043e \u043d\u0435\u0432\u043e\u0437\u0431\u0440\u0430\u043d\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u0430\u0439\u0442 \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443 4-\u0431\u0430\u0439\u0442\u043e\u0432\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043e\u0448\u0438\u0431\u043e\u043a. \u0412\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f<\/p>\n<\/li>\n<li>\n<p>\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \/ \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043d\u043e\u0433\u043e\u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e\u0437\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 endianness \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u0434 \u043d\u0435\u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0443 \u0430 \u0447\u0442\u043e \u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e?<\/p>\n<ul>\n<li>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431.     <\/p>\n<\/li>\n<li>\n<p>\u0421\u0430\u043c\u0430\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \/ \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0433\u043e\u0434\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 1-2 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u0434\u0435. \u041b\u0430\u0434\u043d\u043e, \u044f \u043f\u043e\u0448\u0443\u0442\u0438\u043b, \u0442\u0430\u043a, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0438\u043a\u0442\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0414\u0430\u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u0439\u043c\u0435\u0442, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0431\u044b \u0430\u0434\u0440\u0435\u0441\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0433\u0434\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0432 \u0432\u0438\u0434\u0435 \u043d\u0430\u0431\u043e\u0440\u0430 \u043c\u0430\u043a\u0440\u043e\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439. \u0412\u043e\u0442 \u0442\u0430\u043a: <\/p>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 2.<\/p>\n<pre><code class=\"cpp\">#define PARAM1_ADDR0x00 #define PARAM2_ADDR0x01 #define PARAM3_ADDR0x05<\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u043a\u043e\u0434\u0435 \u0432\u043c\u0435\u0441\u0442\u043e \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u0430\u0441\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"cpp\">eeprom_read(PARAM2_ADDR, &amp;param2, 4);<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u0435\u0449\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0431\u0430\u0439\u0442\u0430\u0445 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c. \u0427\u0442\u043e \u044d\u0442\u043e \u043d\u0430\u043c \u0434\u0430\u0435\u0442 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043f\u0435\u0440\u0432\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c:<\/p>\n<ul>\n<li>\n<p>\u0410\u0434\u0440\u0435\u0441\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0438\u0445 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0449\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u043d\u044c\u0448\u0435 \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0447\u0438\u0441\u0435\u043b<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u0432\u0441\u0435 \u0442\u0435 \u0436\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438. \u0410 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443? \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u0443\u044e:<\/p>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 3.<\/p>\n<pre><code class=\"cpp\">#define STRUCT_PARAM_ADDR 0x00  struct myParamStruct { uint8_t param1; uint32_t param2; char param3[10]; } paramSet;  \/\/ \u0427\u0438\u0442\u0430\u0435\u043c eeprom_read(STRUCT_PARAM_ADDR, (uint8_t *)&amp;paramSet, sizeof(paramSet)); do_the_job1(&amp;paramSet);  \/\/ \u041f\u0438\u0448\u0435\u043c eeprom_write(STRUCT_PARAM_ADDR, (const uint8_t *)&amp;paramSet, sizeof(paramSet));  \/\/ \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 setVolume(paramSet.param1); paramSet.param2 = getLevel(); <\/code><\/pre>\n<p>\u0423\u0436\u0435 \u043b\u0443\u0447\u0448\u0435. \u0427\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u043d\u0430\u043c \u0434\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443:<\/p>\n<ul>\n<li>\n<p>\u041b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e\u0441\u0442\u044c. \u041e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0438\u043b\u0438 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \/ \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0441\u044c\u043c\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043b\u0438\u0445\u043e \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043c\u0430\u0441\u0441\u0438\u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0430\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0443\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438)<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0437\u0430 \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0437\u043b\u043e\u0436\u0435\u043d \u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440. \u041d\u0430\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u0432 \u041f\u0417\u0423, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0438 \u0435\u0435 \u0440\u0430\u0437\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u0435\u0449\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u0430\u043c \u0436\u0435<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<\/li>\n<li>\n<p>\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u041f\u0417\u0423. \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0443\u0441\u0443\u0433\u0443\u0431\u043b\u044f\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043d\u043e\u0433\u043e<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043e\u0448\u0438\u0431\u043e\u043a. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u043d\u0430 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u041e\u0417\u0423, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0438\u0445 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u043f\u0440\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044e. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044f CRC16 \u0438\u043b\u0438 CRC32 \u043f\u043e\u0431\u0430\u0439\u0442\u043d\u043e \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u0432 \u0442\u0443 \u0436\u0435 \u041f\u0417\u0423.<\/p>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 4.<\/p>\n<pre><code class=\"cpp\">#define STRUCT_PARAM_ADDR 0x00 #define CRC32_ADDR 0x100  struct myParamStruct { uint8_t param1; uint32_t param2; char param3[10]; } paramSet; uint32_t crc32;  \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 #if (STRUCT_PARAM_ADDR + sizeof(paramSet)) > CRC32_ADDR #error Size of struct myParamStruct is too big! #endif  \/\/ \u0427\u0438\u0442\u0430\u0435\u043c eeprom_read(STRUCT_PARAM_ADDR, (uint8_t *)&amp;paramSet, sizeof(paramSet)); eeprom_read(CRC32_ADDR , (uint8_t *)&amp;crc32, sizeof(crc32)); if (get_\u0441rc32(&amp;paramSet, sizeof(paramSet)) != crc32) { \/\/ TODO \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 } do_the_job1(&amp;paramSet);  \/\/ \u041f\u0438\u0448\u0435\u043c eeprom_write(STRUCT_PARAM_ADDR, (const uint8_t *)&amp;paramSet, sizeof(paramSet)); crc32 = get_\u0441rc32(&amp;paramSet, sizeof(paramSet)); eeprom_write(CRC32_ADDR, (uint8_t *)&amp;crc32, sizeof(crc32)); <\/code><\/pre>\n<p>\u0427\u0442\u043e \u043e\u0431\u0449\u0435\u0433\u043e \u0443 \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u041f\u0417\u0423 \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0437 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u043b\u0438 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u041f\u0417\u0423, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u043f\u0440\u0430\u0432\u043a\u0430 application \u043a\u043e\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u041c\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u041f\u0417\u0423, \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432 \u2013 \u0432\u0441\u0435 \u044d\u0442\u043e \u043b\u0438\u0448\u043d\u044f\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u0435\u0448\u0430\u0435\u0442 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u0434\u0435<\/p>\n<\/li>\n<li>\n<p>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u044f\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0438 \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0442\u0440\u0443\u0434\u043d\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c \u0447\u0435\u0440\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 \u043e\u0431\u043c\u0435\u043d\u0430 \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043c\u0438\u0440\u043e\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041d\u0443 \u0438\u043b\u0438 \u0433\u043e\u043d\u044f\u0442\u044c \u043f\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u043f\u043e\u043b\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0431\u0430\u0439\u0442 \u2013 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c \u0432\u0441\u0435 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u044b, \u0435\u0441\u043b\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0432\u0435\u043b\u0438\u043a\u043e. \u042d\u0442\u043e \u043f\u0440\u0430\u0432\u0434\u0430, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u041c\u041a \u0438\u043b\u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u043b\u0443\u0447\u0448\u0435 \u043d\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c. \u041d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043a\u043e\u0434 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043d\u043e\u0433\u043e, \u0438 \u0438\u0445 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0447\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0442 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f (\u0432 \u0447\u0435\u043c-\u0442\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u0438\u043a\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c\u0438 \u041e\u041e\u041f, \u0434\u0430):<\/p>\n<ul>\n<li>\n<p>\u0418\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u043e\u0442 \u0436\u0435\u043b\u0435\u0437\u0430. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u041f\u0417\u0423<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0441\u0442\u044c. \u041c\u043e\u0434\u0443\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0438 \u041f\u041a \u0432 \u043a\u0430\u043a\u043e\u043c-\u043d\u0438\u0431\u0443\u0434\u044c Qt Creator<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438\u0437 \u043d\u0430\u0431\u043e\u0440\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0433\u0440\u0443\u043f\u043f\u044b, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0433\u0440\u0443\u043f\u043f \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c \u0432\u0438\u0434\u0435<\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u041f\u0417\u0423 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0423\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u2013 \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 3 \u0431\u0430\u0439\u0442, \u043e\u043d \u0438 \u0432 \u041f\u0417\u0423 \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c 3 \u0431\u0430\u0439\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0423\u0434\u043e\u0431\u043d\u044b\u0439 API \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445. \u0426\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439, \u0441\u0442\u0440\u043e\u043a\u0438 + \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u043b\u0438\u0447\u0438\u0435 callback \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443<\/p>\n<\/li>\n<li>\n<p>\u044f\u0437\u044b\u043a \u0421 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0447\u0438\u0441\u0442\u043e C \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u0443\u043b\u0430\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u0412 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u043b\u0435\u0436\u0438\u0442 \u0434\u0440\u0435\u0432\u043e\u0432\u0438\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432 \u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0431\u0430\u0439\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u044b \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0434\u0435\u0440\u0435\u0432\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u044b<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u044b \u0434\u0435\u0440\u0435\u0432\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u043d\u0435\u043a\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u041e\u0417\u0423, \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u2013 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043e\u0437\u0436\u0435<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u044b, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0435\u0441\u044f \u043d\u0438\u0436\u0435 \u043f\u043e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 (\u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u0443\u0437\u0435\u043b)<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043f\u043e \u0432\u0435\u0442\u0432\u044f\u043c \u0434\u0435\u0440\u0435\u0432\u0430, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0435\u0442\u0432\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u041e\u0417\u0423 \u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u041f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430. \u041f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u2013 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0432\u0441\u0435. \u041d\u0430 \u044d\u0442\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435 \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430 \u044d\u0442\u043e\u043c \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c. \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0434\u0435\u0442\u0430\u043b\u044f\u0445, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0447\u0438<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-398221","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/398221","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=398221"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/398221\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=398221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=398221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=398221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}