LibDriver SGP40
Loading...
Searching...
No Matches
sgp40 extern driver function

sgp40 extern driver modules More...

Collaboration diagram for sgp40 extern driver function:

Functions

uint8_t sgp40_set_reg (sgp40_handle_t *handle, uint16_t reg, uint8_t *buf, uint16_t len)
 set the chip register
uint8_t sgp40_get_reg (sgp40_handle_t *handle, uint16_t reg, uint8_t *buf, uint16_t len)
 get the chip register

Detailed Description

sgp40 extern driver modules

Function Documentation

◆ sgp40_get_reg()

uint8_t sgp40_get_reg ( sgp40_handle_t * handle,
uint16_t reg,
uint8_t * buf,
uint16_t len )

get the chip register

Parameters
[in]*handlepointer to an sgp40 handle structure
[in]regiic register address
[out]*bufpointer to a data buffer
[in]lendata buffer length
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 698 of file driver_sgp40.c.

◆ sgp40_set_reg()

uint8_t sgp40_set_reg ( sgp40_handle_t * handle,
uint16_t reg,
uint8_t * buf,
uint16_t len )

set the chip register

Parameters
[in]*handlepointer to an sgp40 handle structure
[in]regiic register address
[in]*bufpointer to a data buffer
[in]lendata buffer length
Returns
status code
  • 0 success
  • 1 write failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 671 of file driver_sgp40.c.