LibDriver INA226  1.0.0
INA226 full-featured driver
ina226 extern driver function

ina226 extern driver modules More...

Functions

uint8_t ina226_set_reg (ina226_handle_t *handle, uint8_t reg, uint16_t data)
 set the chip register More...
 
uint8_t ina226_get_reg (ina226_handle_t *handle, uint8_t reg, uint16_t *data)
 get the chip register More...
 

Detailed Description

ina226 extern driver modules

Function Documentation

◆ ina226_get_reg()

uint8_t ina226_get_reg ( ina226_handle_t handle,
uint8_t  reg,
uint16_t *  data 
)

get the chip register

Parameters
[in]*handlepointer to an ina226 handle structure
[in]regregister address
[out]*datapointer to a data buffer
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1914 of file driver_ina226.c.

◆ ina226_set_reg()

uint8_t ina226_set_reg ( ina226_handle_t handle,
uint8_t  reg,
uint16_t  data 
)

set the chip register

Parameters
[in]*handlepointer to an ina226 handle structure
[in]regregister address
[in]datawritten data
Returns
status code
  • 0 success
  • 1 write failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1888 of file driver_ina226.c.