#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
|
enum | modbus_if_t { Modbus_InterfaceRTU = 0
, Modbus_InterfaceASCII
, Modbus_InterfaceTCP
} |
|
enum | modbus_function_t {
ModBus_ReadCoils = 1
, ModBus_ReadDiscreteInputs = 2
, ModBus_ReadHoldingRegisters = 3
, ModBus_ReadInputRegisters = 4
,
ModBus_WriteCoil = 5
, ModBus_WriteRegister = 6
, ModBus_ReadExceptionStatus = 7
, ModBus_Diagnostics = 8
,
ModBus_WriteCoils = 15
, ModBus_WriteRegisters = 16
} |
|
◆ MODBUS_MAX_ADU_SIZE
#define MODBUS_MAX_ADU_SIZE 12 |
◆ MODBUS_QUEUE_LENGTH
#define MODBUS_QUEUE_LENGTH 8 |
◆ MODBUS_SET_LSB16
#define MODBUS_SET_LSB16 |
( |
|
v | ) |
((v) & 0xFF) |
◆ MODBUS_SET_MSB16
#define MODBUS_SET_MSB16 |
( |
|
v | ) |
((v) >> 8) |
◆ modbus_flush_queue_ptr
typedef void(* modbus_flush_queue_ptr) (void) |
◆ modbus_is_up_ptr
typedef bool(* modbus_is_up_ptr) (void) |
◆ modbus_send_ptr
◆ modbus_set_silence_ptr
◆ modbus_function_t
Enumerator |
---|
ModBus_ReadCoils | |
ModBus_ReadDiscreteInputs | |
ModBus_ReadHoldingRegisters | |
ModBus_ReadInputRegisters | |
ModBus_WriteCoil | |
ModBus_WriteRegister | |
ModBus_ReadExceptionStatus | |
ModBus_Diagnostics | |
ModBus_WriteCoils | |
ModBus_WriteRegisters | |
◆ modbus_if_t
Enumerator |
---|
Modbus_InterfaceRTU | |
Modbus_InterfaceASCII | |
Modbus_InterfaceTCP | |
◆ modbus_enabled()
bool modbus_enabled |
( |
void |
| ) |
|
◆ modbus_flush_queue()
void modbus_flush_queue |
( |
void |
| ) |
|
◆ modbus_isup()
bool modbus_isup |
( |
void |
| ) |
|
◆ modbus_read_u16()
uint16_t modbus_read_u16 |
( |
uint8_t * |
p | ) |
|
◆ modbus_register_api()
◆ modbus_send()
◆ modbus_set_silence()
◆ modbus_write_u16()
void modbus_write_u16 |
( |
uint8_t * |
p, |
|
|
uint16_t |
value |
|
) |
| |