109 for (i = 0; i < times; i++)
111 int64_t quantity_electricity_counter;
driver hlw8032 read test header file
uint8_t hlw8032_read(hlw8032_handle_t *handle, hlw8032_data_t *data)
read the data
uint8_t hlw8032_deinit(hlw8032_handle_t *handle)
close the chip
uint8_t hlw8032_init(hlw8032_handle_t *handle)
initialize the chip
uint8_t hlw8032_set_mode(hlw8032_handle_t *handle, hlw8032_mode_t mode)
set mode
struct hlw8032_info_s hlw8032_info_t
hlw8032 information structure definition
uint8_t hlw8032_info(hlw8032_info_t *info)
get chip's information
uint8_t hlw8032_quantity_electricity_export(hlw8032_handle_t *handle, int64_t *quantity_electricity_counter)
quantity electricity export
struct hlw8032_handle_s hlw8032_handle_t
hlw8032 handle structure definition
hlw8032_mode_t
hlw8032 mode enumeration definition
struct hlw8032_data_s hlw8032_data_t
hlw8032 data structure definition
void hlw8032_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t hlw8032_interface_uart_flush(void)
interface uart flush
void hlw8032_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t hlw8032_interface_uart_init(void)
interface uart init
uint8_t hlw8032_interface_uart_deinit(void)
interface uart deinit
uint16_t hlw8032_interface_uart_read(uint8_t *buf, uint16_t len)
interface uart read
#define DRIVER_HLW8032_LINK_UART_INIT(HANDLE, FUC)
link uart_init function
#define DRIVER_HLW8032_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_HLW8032_LINK_INIT(HANDLE, STRUCTURE)
initialize hlw8032_handle_t structure
#define DRIVER_HLW8032_LINK_UART_FLUSH(HANDLE, FUC)
link uart_flush function
#define DRIVER_HLW8032_LINK_UART_DEINIT(HANDLE, FUC)
link uart_deinit function
#define DRIVER_HLW8032_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_HLW8032_LINK_UART_READ(HANDLE, FUC)
link uart_read function
uint8_t hlw8032_read_test(hlw8032_mode_t mode, uint32_t times)
read test
float quantity_electricity_kwh
uint32_t voltage_parameter_raw
float effective_current_a
uint32_t current_parameter_raw
float effective_voltage_v
uint32_t power_parameter_raw
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v