LibDriver SPS30  1.0.0
SPS30 full-featured driver
sps30 extern driver function

sps30 extern driver modules More...

Functions

uint8_t sps30_set_reg_iic (sps30_handle_t *handle, uint16_t reg, uint8_t *buf, uint16_t len)
 set the chip register with iic interface More...
 
uint8_t sps30_get_reg_iic (sps30_handle_t *handle, uint16_t reg, uint8_t *buf, uint16_t len)
 get the chip register with iic interface More...
 
uint8_t sps30_set_get_reg_uart (sps30_handle_t *handle, uint8_t *input, uint16_t in_len, uint8_t *output, uint16_t out_len)
 set and get the chip register with uart interface More...
 

Detailed Description

sps30 extern driver modules

Function Documentation

◆ sps30_get_reg_iic()

uint8_t sps30_get_reg_iic ( sps30_handle_t handle,
uint16_t  reg,
uint8_t *  buf,
uint16_t  len 
)

get the chip register with iic interface

Parameters
[in]*handlepointer to an sps30 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 2241 of file driver_sps30.c.

◆ sps30_set_get_reg_uart()

uint8_t sps30_set_get_reg_uart ( sps30_handle_t handle,
uint8_t *  input,
uint16_t  in_len,
uint8_t *  output,
uint16_t  out_len 
)

set and get the chip register with uart interface

Parameters
[in]*handlepointer to an sps30 handle structure
[in]*inputpointer to an input buffer
[in]in_leninput length
[out]*outputpointer to an output buffer
[in]out_lenoutput length
Returns
status code
  • 0 success
  • 1 write read failed
Note
none

Definition at line 2169 of file driver_sps30.c.

◆ sps30_set_reg_iic()

uint8_t sps30_set_reg_iic ( sps30_handle_t handle,
uint16_t  reg,
uint8_t *  buf,
uint16_t  len 
)

set the chip register with iic interface

Parameters
[in]*handlepointer to an sps30 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 2205 of file driver_sps30.c.