LibDriver HLW8032
Loading...
Searching...
No Matches
hlw8032_handle_s Struct Reference

hlw8032 handle structure definition More...

#include <driver_hlw8032.h>

Data Fields

uint8_t(* uart_init )(void)
uint8_t(* uart_deinit )(void)
uint16_t(* uart_read )(uint8_t *buf, uint16_t len)
uint8_t(* uart_flush )(void)
void(* delay_ms )(uint32_t ms)
void(* debug_print )(const char *const fmt,...)
uint8_t inited
uint8_t mode
float voltage_coefficient
float current_coefficient
float voltage_kl
float current_k2
float power_k3
uint8_t is_first
int64_t pf_counter
uint16_t pf_last_counter
uint8_t pf_last_ovf

Detailed Description

hlw8032 handle structure definition

Definition at line 150 of file driver_hlw8032.h.

Field Documentation

◆ current_coefficient

float current_coefficient

current coefficient

Definition at line 161 of file driver_hlw8032.h.

◆ current_k2

float current_k2

current k2

Definition at line 163 of file driver_hlw8032.h.

◆ debug_print

void(* debug_print) (const char *const fmt,...)

point to a debug_print function address

Definition at line 157 of file driver_hlw8032.h.

◆ delay_ms

void(* delay_ms) (uint32_t ms)

point to a delay_ms function address

Definition at line 156 of file driver_hlw8032.h.

◆ inited

uint8_t inited

inited flag

Definition at line 158 of file driver_hlw8032.h.

◆ is_first

uint8_t is_first

first flag

Definition at line 165 of file driver_hlw8032.h.

◆ mode

uint8_t mode

mode

Definition at line 159 of file driver_hlw8032.h.

◆ pf_counter

int64_t pf_counter

pf counter

Definition at line 166 of file driver_hlw8032.h.

◆ pf_last_counter

uint16_t pf_last_counter

pf last counter

Definition at line 167 of file driver_hlw8032.h.

◆ pf_last_ovf

uint8_t pf_last_ovf

pf last ovf

Definition at line 168 of file driver_hlw8032.h.

◆ power_k3

float power_k3

power k3

Definition at line 164 of file driver_hlw8032.h.

◆ uart_deinit

uint8_t(* uart_deinit) (void)

point to an uart_deinit function address

Definition at line 153 of file driver_hlw8032.h.

◆ uart_flush

uint8_t(* uart_flush) (void)

point to an uart_flush function address

Definition at line 155 of file driver_hlw8032.h.

◆ uart_init

uint8_t(* uart_init) (void)

point to an uart_init function address

Definition at line 152 of file driver_hlw8032.h.

◆ uart_read

uint16_t(* uart_read) (uint8_t *buf, uint16_t len)

point to an uart_read function address

Definition at line 154 of file driver_hlw8032.h.

◆ voltage_coefficient

float voltage_coefficient

voltage coefficient

Definition at line 160 of file driver_hlw8032.h.

◆ voltage_kl

float voltage_kl

voltage kl

Definition at line 162 of file driver_hlw8032.h.


The documentation for this struct was generated from the following file: