LibDriver INA219
Loading...
Searching...
No Matches
ina219 extern driver function

ina219 extern driver modules More...

Collaboration diagram for ina219 extern driver function:

Functions

uint8_t ina219_set_reg (ina219_handle_t *handle, uint8_t reg, uint16_t data)
 set the chip register
uint8_t ina219_get_reg (ina219_handle_t *handle, uint8_t reg, uint16_t *data)
 get the chip register

Detailed Description

ina219 extern driver modules

Function Documentation

◆ ina219_get_reg()

uint8_t ina219_get_reg ( ina219_handle_t * handle,
uint8_t reg,
uint16_t * data )

get the chip register

Parameters
[in]*handlepointer to an ina219 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 1170 of file driver_ina219.c.

◆ ina219_set_reg()

uint8_t ina219_set_reg ( ina219_handle_t * handle,
uint8_t reg,
uint16_t data )

set the chip register

Parameters
[in]*handlepointer to an ina219 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 1144 of file driver_ina219.c.