28 lines
541 B
C
Executable File
28 lines
541 B
C
Executable File
#ifndef ORNO_MODBUS_H_
|
|
#define ORNO_MODBUS_H_
|
|
|
|
#include "esp_err.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef enum {
|
|
ORNO_METER_GRID,
|
|
ORNO_METER_EVSE
|
|
} orno_meter_type_t;
|
|
|
|
esp_err_t orno_modbus_init(void);
|
|
esp_err_t orno_modbus_read_current(orno_meter_type_t type, float *current);
|
|
void orno_modbus_set_meter_test(bool state);
|
|
void orno_modbus_set_model(bool enabled);
|
|
bool orno_modbus_get_meter_state(void);
|
|
void orno_modbus_start(void);
|
|
void orno_modbus_stop(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* ORNO_MODBUS_H_ */
|