77 lines
13 KiB
TeX
77 lines
13 KiB
TeX
\doxysection{E\+:/.WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/modbus\+\_\+config.h}
|
||
\hypertarget{modbus__config_8h_source}{}\label{modbus__config_8h_source}\mbox{\hyperlink{modbus__config_8h}{Go to the documentation of this file.}}
|
||
\begin{DoxyCode}{0}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00001}00001\ \textcolor{comment}{/**}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00002}00002\ \textcolor{comment}{******************************************************************************}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00003}00003\ \textcolor{comment}{*\ @file\ modbus\_config.h}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00004}00004\ \textcolor{comment}{*\ @brief\ Конфигурационные\ параметры\ Modbus\ устройства}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00005}00005\ \textcolor{comment}{******************************************************************************}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00006}00006\ \textcolor{comment}{@addtogroup\ MODBUS\_CONFIGS\ Modbus\ configs}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00007}00007\ \textcolor{comment}{@ingroup\ \ \ \ MODBUS}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00008}00008\ \textcolor{comment}{@brief\ Конфигурация\ библиотеки}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00009}00009\ \textcolor{comment}{@\{}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00010}00010\ \textcolor{comment}{******************************************************************************}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00011}00011\ \textcolor{comment}{*\ @details}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00012}00012\ \textcolor{comment}{Файл\ содержит\ настройки\ для\ работы\ Modbus:}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00013}00013\ \textcolor{comment}{-\/\ Подключение\ библиотек\ контроллера}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00014}00014\ \textcolor{comment}{-\/\ ID\ устройства\ и\ таймауты}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00015}00015\ \textcolor{comment}{-\/\ Строковые\ идентификаторы\ (Vendor,\ Product,\ Revision)}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00016}00016\ \textcolor{comment}{-\/\ Настройки\ периферии\ (UART,\ TIMER)}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00017}00017\ \textcolor{comment}{-\/\ Подключение\ модулей\ Modbus}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00018}00018\ \textcolor{comment}{-\/\ Опциональные\ функции\ (переключение\ команд\ 0x03/0x04)}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00019}00019\ \textcolor{comment}{******************************************************************************/}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00020}00020\ \textcolor{preprocessor}{\#ifndef\ \_MODBUS\_CONFIG\_H\_}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00021}00021\ \textcolor{preprocessor}{\#define\ \_MODBUS\_CONFIG\_H\_}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00022}00022\ \textcolor{preprocessor}{\#include\ "{}stm32f1xx\_hal.h"{}}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00023}00023\ }
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00024}00024\ \textcolor{comment}{//\ Общие\ параметры}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00025}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gab9b18e108b98b225a52c5ccca58e7f2b}{00025}}\ \textcolor{preprocessor}{\#define\ MODBUS\_DEVICE\_ID\ \ \ \ \ \ \ \ \ \ \ \ \ \ 1\ \ \ \ \ \ \ }\textcolor{comment}{///<\ Адрес\ устройства\ в\ сети\ Modbus}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00026}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga66f7c59a25c8cca6d5b0991895c26b69}{00026}}\ \textcolor{preprocessor}{\#define\ MODBUS\_TIMEOUT\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 5000\ \ \ \ }\textcolor{comment}{///<\ Таймаут\ в\ тиках\ таймера}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00027}00027\ }
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00028}00028\ \textcolor{comment}{//\ Строковые\ идентификаторы\ устройства}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00029}00029\ \textcolor{preprocessor}{\#define\ MODBUS\_VENDOR\_NAME\ \ \ \ \ \ \ \ \ \ \ \ "{}NIO-\/12"{}}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00030}00030\ \textcolor{preprocessor}{\#define\ MODBUS\_PRODUCT\_CODE\ \ \ \ \ \ \ \ \ \ \ "{}"{}}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00031}00031\ \textcolor{preprocessor}{\#define\ MODBUS\_REVISION\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "{}"{}}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00032}00032\ \textcolor{preprocessor}{\#define\ MODBUS\_VENDOR\_URL\ \ \ \ \ \ \ \ \ \ \ \ \ "{}"{}}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00033}00033\ \textcolor{preprocessor}{\#define\ MODBUS\_PRODUCT\_NAME\ \ \ \ \ \ \ \ \ \ \ "{}"{}}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00034}00034\ \textcolor{preprocessor}{\#define\ MODBUS\_MODEL\_NAME\ \ \ \ \ \ \ \ \ \ \ \ \ "{}"{}}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00035}00035\ \textcolor{preprocessor}{\#define\ MODBUS\_USER\_APPLICATION\_NAME\ \ "{}"{}}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00036}00036\ }
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00037}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga5c7e9c2180ceac1208f4b791d7b70a0a}{00037}}\ \textcolor{preprocessor}{\#define\ MODBUS\_NUMB\_OF\_USEROBJECTS\ \ \ \ 0\ \ \ }\textcolor{comment}{///<\ Количество\ пользовательских\ объектов}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00038}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gac3b162e9af2731742eb3ca8317b37397}{00038}}\ \textcolor{preprocessor}{\#define\ MODBUS\_USEROBJECT\_0\_NAME\ \ \ \ \ \ "{}"{}\ \ }\textcolor{comment}{///<\ Строка\ пользовательского\ идентификатора\ 0.\ По\ аналогии\ можно\ определить\ строки\ до\ <=128\ USEROBJECT}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00039}00039\ }
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00040}00040\ \textcolor{comment}{//\ Периферия\ (опционально)}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00041}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga370986118b8227cb6cb33c6b748fbbcb}{00041}}\ \textcolor{preprocessor}{\#define\ mb\_huart\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ huart1\ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Удобный\ дефайн\ для\ модбасовского\ uart}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00042}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga6723a1608946a4f86cd7c9c7e614d04e}{00042}}\ \textcolor{preprocessor}{\#define\ mb\_htim\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ htim3\ \ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Удобный\ дефайн\ для\ модбасовского\ таймера}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00043}00043\ \textcolor{comment}{//\#define\ RS\_EnableReceive()\ \ \ \ \ \ \ \ \ \ ///<\ Функция\ изменения\ направления\ передачи\ на\ ПРИЕМ\ для\ RS-\/485}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00044}00044\ \textcolor{comment}{//\#define\ RS\_EnableTransmit()\ \ \ \ \ \ \ \ \ ///<\ Функция\ изменения\ направления\ передачи\ на\ ПЕРЕДАЧУ\ для\ RS-\/485}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00045}00045\ }
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00046}00046\ }
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00047}00047\ \textcolor{comment}{//\ Модули\ modbus}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00048}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gae11f9ed7ca5e75d332a1187d2a213f9c}{00048}}\ \textcolor{preprocessor}{\#define\ MODBUS\_ENABLE\_SLAVE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Включить\ обработку\ СЛЕЙВ\ режима}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00049}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gae4fc30421556e1ee530f13a4b3924f5a}{00049}}\ \textcolor{preprocessor}{\#define\ MODBUS\_ENABLE\_MASTER\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Включить\ обработку\ МАСТЕР\ режима}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00050}00050\ }
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00051}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga29ce22b8b7f0622bc23171c6ae2dc8d1}{00051}}\ \textcolor{preprocessor}{\#define\ MODBUS\_ENABLE\_COILS\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Включить\ обработку\ коилов}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00052}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gaf6a8dfc090b3915d668d78ee19585344}{00052}}\ \textcolor{preprocessor}{\#define\ MODBUS\_ENABLE\_HOLDINGS\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Включить\ обработку\ регистров\ хранения}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00053}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga23d7073c81bedb80a302140afd0d79c0}{00053}}\ \textcolor{preprocessor}{\#define\ MODBUS\_ENABLE\_INPUTS\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Включить\ обработку\ входных\ регистров}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00054}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga5bf9f305bd863b10f1b350c5004ddda7}{00054}}\ \textcolor{preprocessor}{\#define\ MODBUS\_ENABLE\_DEVICE\_IDENTIFICATIONS\ \ }\textcolor{comment}{///<\ Включить\ обработку\ идентификаторы\ устройства}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00055}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gae68222efbcf3199706bfaef46af97bf8}{00055}}\ \textcolor{preprocessor}{\#define\ MODBUS\_ENABLE\_DIAGNOSTICS\ \ \ \ \ \ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Включить\ обработку\ диагностики\ модбас}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00056}00056\ }
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00057}00057\ \textcolor{comment}{//\#define\ MODBUS\_PROTOCOL\_TCP\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ///<\ Включить\ TCP-\/протокол,\ иначе\ -\/\ RTU}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00058}00058\ \textcolor{comment}{}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00059}00059\ \textcolor{comment}{/**}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00060}00060\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ Поменять\ комманды\ 0x03\ и\ 0x04\ местами\ (для\ LabView\ терминалки\ от\ двигателей)}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00061}00061\ \textcolor{comment}{\ \ *\ @details\ \ Терминалка\ от\ двигателей\ использует\ для\ чтения\ регистров\ комманду\ R\_HOLD\_REGS\ вместо\ R\_IN\_REGS}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00062}00062\ \textcolor{comment}{\ \ *\ \ \ \ \ \ \ \ \ \ \ Поэтому\ чтобы\ считывать\ Input\ Regs\ -\/\ надо\ поменять\ их\ местами.}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00063}00063\ \textcolor{comment}{\ \ */}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00064}00064\ \textcolor{comment}{//\#define\ MODBUS\_SWITCH\_COMMAND\_R\_IN\_REGS\_AND\_R\_HOLD\_REGS}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00065}00065\ \textcolor{comment}{}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00066}00066\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00067}00067\ \textcolor{comment}{/////////////////////////-\/-\/-\/CALC\ DEFINES-\/-\/-\///////////////////////////}}
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00068}00068\ }
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00069}00069\ }
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00070}00070\ \ \ }
|
||
\DoxyCodeLine{\Hypertarget{modbus__config_8h_source_l00071}00071\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\_MODBUS\_CONFIG\_H\_}}
|
||
|
||
\end{DoxyCode}
|