| LightHub v4.0.0 Smarthome controller firmware

Classes | Macros | Functions | Variables
out_modbus.cpp File Reference
`#include "modules/out_modbus.h"`
`#include "Arduino.h"`
`#include "options.h"`
`#include "utils.h"`
`#include "Streaming.h"`
`#include "item.h"`
`#include <ModbusMaster.h>`
`#include "main.h"`
`#include <HardwareSerial.h>`

## Classes
struct | reg_t

## Macros
#define | PAR_I16 1
#define | PAR_I32 2
#define | PAR_U16 3
#define | PAR_U32 4
#define | PAR_I8H 5
#define | PAR_I8L 6
#define | PAR_U8H 7
#define | PAR_U8L 8
#define | PAR_TENS 9
#define | regSizeNum sizeof(regSize_P)/sizeof(reg_t)

## Functions
void | modbusIdle (void)
int | str2regSize (char *str)
bool | readModbus (uint16_t reg, int regType, int count)

## Variables
aJsonObject * | modbusObj
ModbusMaster | node
short | modbusBusy
const reg_t regSize_P[] | PROGMEM

## Macro Definition Documentation

## ◆ PAR_I16

#define PAR_I16 1

## ◆ PAR_I32

#define PAR_I32 2

## ◆ PAR_I8H

#define PAR_I8H 5

## ◆ PAR_I8L

#define PAR_I8L 6

## ◆ PAR_TENS

#define PAR_TENS 9

## ◆ PAR_U16

#define PAR_U16 3

## ◆ PAR_U32

#define PAR_U32 4

## ◆ PAR_U8H

#define PAR_U8H 7

## ◆ PAR_U8L

#define PAR_U8L 8

## ◆ regSizeNum

#define regSizeNum sizeof(regSize_P)/sizeof(reg_t)

## Function Documentation

## ◆ modbusIdle()

void modbusIdle | ( | void |  | ) |

## ◆ readModbus()

bool readModbus | ( | uint16_t | reg,
|  | int | regType,
|  | int | count
| ) |  |

## ◆ str2regSize()

int str2regSize | ( | char * | str | ) |

## Variable Documentation

## ◆ modbusBusy

short modbusBusy
| extern

## ◆ modbusObj

aJsonObject* modbusObj
| extern

## ◆ node

ModbusMaster node
| extern

## ◆ PROGMEM

const reg_t regSize_P [] PROGMEM

Initial value:
=
{
{ "i16", (uint8_t) PAR_I16 },
{ "i32", (uint8_t) PAR_I32 },
{ "u16", (uint8_t) PAR_U16 },
{ "u32", (uint8_t) PAR_U32 },
{ "i8h", (uint8_t) PAR_I8H },
{ "i8l", (uint8_t) PAR_I8L },
{ "u8h", (uint8_t) PAR_U8H },
{ "u8l", (uint8_t) PAR_U8L },
{ "x10", (uint8_t) PAR_TENS }
}
PAR_U32
#define PAR_U32
Definition: out_modbus.cpp:36
PAR_I16
#define PAR_I16
Definition: out_modbus.cpp:33
PAR_I32
#define PAR_I32
Definition: out_modbus.cpp:34
PAR_U16
#define PAR_U16
Definition: out_modbus.cpp:35
PAR_I8H
#define PAR_I8H
Definition: out_modbus.cpp:37
PAR_I8L
#define PAR_I8L
Definition: out_modbus.cpp:38
PAR_U8H
#define PAR_U8H
Definition: out_modbus.cpp:39
PAR_TENS
#define PAR_TENS
Definition: out_modbus.cpp:41
PAR_U8L
#define PAR_U8L
Definition: out_modbus.cpp:40