![]() |
LibDriver SPS30
|
sps30 basic driver modules More...
Data Structures | |
| struct | sps30_handle_s |
| sps30 handle structure definition More... | |
| struct | sps30_pm_s |
| sps30 pm structure definition More... | |
| struct | sps30_info_s |
| sps30 information structure definition More... | |
Typedefs | |
| typedef struct sps30_handle_s | sps30_handle_t |
| sps30 handle structure definition | |
| typedef struct sps30_pm_s | sps30_pm_t |
| sps30 pm structure definition | |
| typedef struct sps30_info_s | sps30_info_t |
| sps30 information structure definition | |
Enumerations | |
| enum | sps30_interface_t { SPS30_INTERFACE_IIC = 0x00 , SPS30_INTERFACE_UART = 0x01 } |
| sps30 interface enumeration definition More... | |
| enum | sps30_format_t { SPS30_FORMAT_IEEE754 = 0x03 , SPS30_FORMAT_UINT16 = 0x05 } |
| sps30 format enumeration definition More... | |
| enum | sps30_data_ready_flag_t { SPS30_DATA_READY_FLAG_NOT_READY = 0x00 , SPS30_DATA_READY_FLAG_AVAILABLE = 0x01 } |
| sps30 data ready flag enumeration definition More... | |
| enum | sps30_status_t { SPS30_STATUS_FAN_SPEED_ERROR = (1 << 21) , SPS30_STATUS_LASER_ERROR = (1 << 5) , SPS30_STATUS_FAN_ERROR = (1 << 4) } |
| sps30 status enumeration definition More... | |
Functions | |
| uint8_t | sps30_info (sps30_info_t *info) |
| get chip information | |
| uint8_t | sps30_set_interface (sps30_handle_t *handle, sps30_interface_t interface) |
| set the chip interface | |
| uint8_t | sps30_get_interface (sps30_handle_t *handle, sps30_interface_t *interface) |
| get the chip interface | |
| uint8_t | sps30_init (sps30_handle_t *handle) |
| initialize the chip | |
| uint8_t | sps30_deinit (sps30_handle_t *handle) |
| close the chip | |
| uint8_t | sps30_read (sps30_handle_t *handle, sps30_pm_t *pm) |
| read the result | |
| uint8_t | sps30_sleep (sps30_handle_t *handle) |
| enter the sleep mode | |
| uint8_t | sps30_reset (sps30_handle_t *handle) |
| reset the chip | |
| uint8_t | sps30_wake_up (sps30_handle_t *handle) |
| wake up the chip | |
| uint8_t | sps30_start_measurement (sps30_handle_t *handle, sps30_format_t format) |
| start the measurement | |
| uint8_t | sps30_stop_measurement (sps30_handle_t *handle) |
| stop the measurement | |
| uint8_t | sps30_read_data_flag (sps30_handle_t *handle, sps30_data_ready_flag_t *flag) |
| read the data read flag | |
| uint8_t | sps30_start_fan_cleaning (sps30_handle_t *handle) |
| start the fan cleaning | |
| uint8_t | sps30_set_auto_cleaning_interval (sps30_handle_t *handle, uint32_t second) |
| set the auto cleaning interval | |
| uint8_t | sps30_get_auto_cleaning_interval (sps30_handle_t *handle, uint32_t *second) |
| get the auto cleaning interval | |
| uint8_t | sps30_disable_auto_cleaning_interval (sps30_handle_t *handle) |
| disable the auto cleaning interval | |
| uint8_t | sps30_get_product_type (sps30_handle_t *handle, char type[9]) |
| get the product type | |
| uint8_t | sps30_get_serial_number (sps30_handle_t *handle, char sn[17]) |
| get the serial number | |
| uint8_t | sps30_get_version (sps30_handle_t *handle, uint8_t *major, uint8_t *minor) |
| get the version | |
| uint8_t | sps30_get_device_status (sps30_handle_t *handle, uint32_t *status) |
| get the device status | |
| uint8_t | sps30_clear_device_status (sps30_handle_t *handle) |
| clear the device status | |
sps30 basic driver modules
| typedef struct sps30_handle_s sps30_handle_t |
sps30 handle structure definition
| typedef struct sps30_info_s sps30_info_t |
sps30 information structure definition
| typedef struct sps30_pm_s sps30_pm_t |
sps30 pm structure definition
sps30 data ready flag enumeration definition
| Enumerator | |
|---|---|
| SPS30_DATA_READY_FLAG_NOT_READY | no new measurements available |
| SPS30_DATA_READY_FLAG_AVAILABLE | new measurements ready to read |
Definition at line 80 of file driver_sps30.h.
| enum sps30_format_t |
sps30 format enumeration definition
| Enumerator | |
|---|---|
| SPS30_FORMAT_IEEE754 | big endian IEEE754 float values |
| SPS30_FORMAT_UINT16 | big endian unsigned 16 bit integer values |
Definition at line 71 of file driver_sps30.h.
| enum sps30_interface_t |
sps30 interface enumeration definition
| Enumerator | |
|---|---|
| SPS30_INTERFACE_IIC | iic interface |
| SPS30_INTERFACE_UART | uart interface |
Definition at line 62 of file driver_sps30.h.
| enum sps30_status_t |
sps30 status enumeration definition
Definition at line 89 of file driver_sps30.h.
| uint8_t sps30_clear_device_status | ( | sps30_handle_t * | handle | ) |
clear the device status
| [in] | *handle | pointer to an sps30 handle structure |
Definition at line 1541 of file driver_sps30.c.
| uint8_t sps30_deinit | ( | sps30_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an sps30 handle structure |
Definition at line 2085 of file driver_sps30.c.
| uint8_t sps30_disable_auto_cleaning_interval | ( | sps30_handle_t * | handle | ) |
disable the auto cleaning interval
| [in] | *handle | pointer to an sps30 handle structure |
Definition at line 1105 of file driver_sps30.c.
| uint8_t sps30_get_auto_cleaning_interval | ( | sps30_handle_t * | handle, |
| uint32_t * | second ) |
get the auto cleaning interval
| [in] | *handle | pointer to an sps30 handle structure |
| [out] | *second | pointer to an interval buffer |
Definition at line 1017 of file driver_sps30.c.
| uint8_t sps30_get_device_status | ( | sps30_handle_t * | handle, |
| uint32_t * | status ) |
get the device status
| [in] | *handle | pointer to an sps30 handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 1453 of file driver_sps30.c.
| uint8_t sps30_get_interface | ( | sps30_handle_t * | handle, |
| sps30_interface_t * | interface ) |
get the chip interface
| [in] | *handle | pointer to an sps30 handle structure |
| [out] | *interface | pointer to a chip interface buffer |
Definition at line 500 of file driver_sps30.c.
| uint8_t sps30_get_product_type | ( | sps30_handle_t * | handle, |
| char | type[9] ) |
get the product type
| [in] | *handle | pointer to an sps30 handle structure |
| [out] | *type | pointer to a product type buffer |
Definition at line 1190 of file driver_sps30.c.
| uint8_t sps30_get_serial_number | ( | sps30_handle_t * | handle, |
| char | sn[17] ) |
get the serial number
| [in] | *handle | pointer to an sps30 handle structure |
| [out] | *sn | pointer to a serial number buffer |
Definition at line 1281 of file driver_sps30.c.
| uint8_t sps30_get_version | ( | sps30_handle_t * | handle, |
| uint8_t * | major, | ||
| uint8_t * | minor ) |
get the version
| [in] | *handle | pointer to an sps30 handle structure |
| [out] | *major | pointer to a major buffer |
| [out] | *minor | pointer to a minor buffer |
Definition at line 1373 of file driver_sps30.c.
| uint8_t sps30_info | ( | sps30_info_t * | info | ) |
get chip information
| [out] | *info | pointer to an sps30 info structure |
Definition at line 2272 of file driver_sps30.c.
| uint8_t sps30_init | ( | sps30_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an sps30 handle structure |
Definition at line 1939 of file driver_sps30.c.
| uint8_t sps30_read | ( | sps30_handle_t * | handle, |
| sps30_pm_t * | pm ) |
read the result
| [in] | *handle | pointer to an sps30 handle structure |
| [out] | *pm | pointer to an sps30 pm structure |
Definition at line 1678 of file driver_sps30.c.
| uint8_t sps30_read_data_flag | ( | sps30_handle_t * | handle, |
| sps30_data_ready_flag_t * | flag ) |
read the data read flag
| [in] | *handle | pointer to an sps30 handle structure |
| [out] | *flag | pointer to a data ready flag buffer |
Definition at line 667 of file driver_sps30.c.
| uint8_t sps30_reset | ( | sps30_handle_t * | handle | ) |
reset the chip
| [in] | *handle | pointer to an sps30 handle structure |
Definition at line 1609 of file driver_sps30.c.
| uint8_t sps30_set_auto_cleaning_interval | ( | sps30_handle_t * | handle, |
| uint32_t | second ) |
set the auto cleaning interval
| [in] | *handle | pointer to an sps30 handle structure |
| [in] | second | interval |
Definition at line 929 of file driver_sps30.c.
| uint8_t sps30_set_interface | ( | sps30_handle_t * | handle, |
| sps30_interface_t | interface ) |
set the chip interface
| [in] | *handle | pointer to an sps30 handle structure |
| [in] | interface | chip interface |
Definition at line 479 of file driver_sps30.c.
| uint8_t sps30_sleep | ( | sps30_handle_t * | handle | ) |
enter the sleep mode
| [in] | *handle | pointer to an sps30 handle structure |
Definition at line 720 of file driver_sps30.c.
| uint8_t sps30_start_fan_cleaning | ( | sps30_handle_t * | handle | ) |
start the fan cleaning
| [in] | *handle | pointer to an sps30 handle structure |
Definition at line 860 of file driver_sps30.c.
| uint8_t sps30_start_measurement | ( | sps30_handle_t * | handle, |
| sps30_format_t | format ) |
start the measurement
| [in] | *handle | pointer to an sps30 handle structure |
| [in] | format | data format |
Definition at line 523 of file driver_sps30.c.
| uint8_t sps30_stop_measurement | ( | sps30_handle_t * | handle | ) |
stop the measurement
| [in] | *handle | pointer to an sps30 handle structure |
Definition at line 599 of file driver_sps30.c.
| uint8_t sps30_wake_up | ( | sps30_handle_t * | handle | ) |
wake up the chip
| [in] | *handle | pointer to an sps30 handle structure |
Definition at line 787 of file driver_sps30.c.