LibDriver INA226
Loading...
Searching...
No Matches
ina226 extern driver function

ina226 extern driver modules More...

Collaboration diagram for ina226 extern driver function:

Functions

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

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.