IoT Supervisor 0.0
|
Enumerations | |
enum | mmw_speeds_t { eMMW_B_NULL = 0 , eMMW_B_38400 , eMMW_B_19200 , eMMW_B_9600 , eMMW_B_4800 , eMMW_B_2400 , eMMW_B_1200 , eMMW_B_NUM } |
enum | mmw_cl_i_t { eMMW_CL_T1_PRE = 0 , eMMW_CL_TH1 , eMMW_CL_PETIT_TOP , eMMW_CL_TL0_TOP , eMMW_CL_NUM } |
enum | mmw_hr_t { eMMW_HR_STA , eMMW_HR_CFG , eMMW_HR_MB , eMMW_HR_WDT , eMMW_HR_PW , eMMW_HR_NUM } |
Functions | |
void | mmw_init (uint8_t sid, uint8_t baud) |
Variables | |
code const uint8_t | mmw_ct [eMMW_B_NUM][eMMW_CL_NUM] |
uint8_t | PETITMODBUS_DLY_TOP = 0 |
uint8_t | PETITMODBUS_SLAVE_ADDRESS = 0 |
uint8_t | PETITMODBUS_DLY_TOP |
uint8_t | PETITMODBUS_SLAVE_ADDRESS |
This section contains the intersection between the petit modbus library and the application and the hardware. It exists because the modbus library does not handle sid switching or baud rate switching. The library also does not handle the hardware when the baud rate switches.
enum mmw_cl_i_t |
This enumeration contains the number of entries across the MMW table.
CL in this context stands for Configuration List.
Definition at line 45 of file ModbusMiddleWare.h.
enum mmw_hr_t |
This is the enumeration for all Holding Registers
Definition at line 83 of file ModbusMiddleWare.h.
enum mmw_speeds_t |
This enumeration contains the speeds used by the Modbus MiddleWare.
Note that these are standard UART speeds.
Definition at line 24 of file ModbusMiddleWare.h.
void mmw_init | ( | uint8_t | sid, |
uint8_t | baud | ||
) |
Modbus MiddleWare Init function takes an SID and a baud rate enumeration and applies it to device hardware and functions to support that selected baud.
sid | Which ID this device should respond to |
baud | rate at which the device communicates on RS485. This is an enumeration that is set to one higher than the index in the mmw_ct table. |
Definition at line 47 of file ModbusMiddleWare.c.
code const uint8_t mmw_ct[eMMW_B_NUM][eMMW_CL_NUM] |
Modbus configuration table containing variables for each standard modbus speed.
These constants were generated largely with aid from the device configurator and with simple pen and paper calculations.
Definition at line 25 of file ModbusMiddleWare.c.
|
extern |
Definition at line 35 of file ModbusMiddleWare.c.
uint8_t PETITMODBUS_DLY_TOP = 0 |
Definition at line 35 of file ModbusMiddleWare.c.
|
extern |
Definition at line 36 of file ModbusMiddleWare.c.
uint8_t PETITMODBUS_SLAVE_ADDRESS = 0 |
Definition at line 36 of file ModbusMiddleWare.c.