Files
UKSI_TEST/AllLibs/Modbus/Inc/modbus_inputregs.h
2025-12-16 17:57:59 +03:00

60 lines
2.2 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
*******************************************************************************
* @file modbus_inputregs.h
* @brief Работа с входными регистрами Modbus
*******************************************************************************
@addtogroup MODBUS_HOLD Holding Registers Tools
@ingroup MODBUS_INTERNAL
@brief Функции для работы с регистрами хранения
*******************************************************************************
* @details
Модуль для доступа к регистрам внутри программы:
- Функции для доступа к входным регистрам по глобальным адресам
Модуль обработки команд для входных регистров (Input Registers):
- Чтение множества регистров (0x04)
@section in Входные регистры:
- Read-Only доступ
- 16-битные значения
******************************************************************************/
#ifndef __MODBUS_INPUTREGS_H_
#define __MODBUS_INPUTREGS_H_
#include "modbus_core.h"
#ifdef MODBUS_ENABLE_INPUTS
/////////////////////////////////////////////////////////////////////
/////////////////////////---FUNCTIONS---/////////////////////////////
/**
* @addtogroup MODBUS_DATA_ACCESS_FUNCTIONS
* @{
*/
/* Записать входной регистр по глобальному адресу. */
MB_ExceptionTypeDef MB_Input_Write_Global(uint16_t Addr, uint16_t WriteVal);
/* Считать входной регистр по глобальному адресу. */
uint16_t MB_Input_Read_Global(uint16_t Addr, MB_ExceptionTypeDef *Exception);
/** MODBUS_DATA_ACCESS_FUNCTIONS
* @}
*/
/**
* @addtogroup MODBUS_CMD_PROCESS_FUNCTIONS Internal Process Functions
* @ingroup MODBUS_INTERNAL
* @brief Функции обработки запросов модбас
* @{
*/
/* Обработать функцию Read Input Registers (04 - 0x04) */
uint8_t MB_Process_Read_Input_Regs(RS_MsgTypeDef *modbus_msg);
/** MODBUS_CMD_PROCESS_FUNCTIONS
* @}
*/
/////////////////////////---FUNCTIONS---/////////////////////////////
#endif //MODBUS_ENABLE_INPUTS
#endif //__MODBUS_INPUTREGS_H_