LibDriver INA226
Loading...
Searching...
No Matches
driver_ina226_interface_template.c
Go to the documentation of this file.
1
36
38
47{
48 return 0;
49}
50
59{
60 return 0;
61}
62
74uint8_t ina226_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
75{
76 return 0;
77}
78
90uint8_t ina226_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
91{
92 return 0;
93}
94
101{
102
103}
104
110void ina226_interface_debug_print(const char *const fmt, ...)
111{
112
113}
114
121{
122 switch (type)
123 {
125 {
126 ina226_interface_debug_print("ina226: irq shunt voltage over voltage.\n");
127
128 break;
129 }
131 {
132 ina226_interface_debug_print("ina226: irq shunt voltage under voltage.\n");
133
134 break;
135 }
137 {
138 ina226_interface_debug_print("ina226: irq bus voltage over voltage.\n");
139
140 break;
141 }
143 {
144 ina226_interface_debug_print("ina226: irq bus voltage under voltage.\n");
145
146 break;
147 }
149 {
150 ina226_interface_debug_print("ina226: irq power over limit.\n");
151
152 break;
153 }
154 default :
155 {
156 ina226_interface_debug_print("ina226: unknown code.\n");
157
158 break;
159 }
160 }
161}
driver ina226 interface header file
@ INA226_STATUS_BUS_VOLTAGE_OVER_VOLTAGE
@ INA226_STATUS_POWER_OVER_LIMIT
@ INA226_STATUS_SHUNT_VOLTAGE_UNDER_VOLTAGE
@ INA226_STATUS_BUS_VOLTAGE_UNDER_VOLTAGE
@ INA226_STATUS_SHUNT_VOLTAGE_OVER_VOLTAGE
void ina226_interface_receive_callback(uint8_t type)
interface receive callback
uint8_t ina226_interface_iic_deinit(void)
interface iic bus deinit
uint8_t ina226_interface_iic_init(void)
interface iic bus init
void ina226_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t ina226_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
void ina226_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t ina226_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read