Доработки и рефакторинг
This commit is contained in:
@@ -98,7 +98,7 @@ typedef enum
|
||||
* @code
|
||||
* // Пример: Запросили 10 coils с адреса 20, хотим узнать состояние coil 25
|
||||
* int coil_state;
|
||||
* if(MB_GetCoilState(&MODBUS_MSG, 25, &coil_state))
|
||||
* if(MB_RespGet_CoilState(&MODBUS_MSG, 25, &coil_state))
|
||||
* {
|
||||
* printf("Coil 25 state: %s\n", coil_state ? "ON" : "OFF");
|
||||
* }
|
||||
@@ -107,7 +107,7 @@ typedef enum
|
||||
* for(int addr = MODBUS_MSG.Addr; addr < MODBUS_MSG.Addr + MODBUS_MSG.Qnt; addr++)
|
||||
* {
|
||||
* int state;
|
||||
* if(MB_GetCoilState(&MODBUS_MSG, addr, &state))
|
||||
* if(MB_RespGet_CoilState(&MODBUS_MSG, addr, &state))
|
||||
* {
|
||||
* printf("Coil %d: %s\n", addr, state ? "ON" : "OFF");
|
||||
* }
|
||||
@@ -115,7 +115,7 @@ typedef enum
|
||||
* @endcode
|
||||
*/
|
||||
|
||||
int MB_GetCoilState(RS_MsgTypeDef *modbus_msg, uint16_t coil_addr, int *coil_state);
|
||||
int MB_RespGet_CoilState(RS_MsgTypeDef *modbus_msg, uint16_t coil_addr, int *coil_state);
|
||||
|
||||
/** MODBUS_REQ_COILS_API
|
||||
* @}
|
||||
|
||||
Reference in New Issue
Block a user