LibDriver PMS3003
Loading...
Searching...
No Matches
driver_pms3003.h File Reference

driver pms3003 header file More...

#include <stdio.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for driver_pms3003.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pms3003_data_s
 pms3003 data structure definition More...
struct  pms3003_handle_s
 pms3003 handle structure definition More...
struct  pms3003_info_s
 pms3003 information structure definition More...

Macros

#define DRIVER_PMS3003_LINK_INIT(HANDLE, STRUCTURE)
 initialize pms3003_handle_t structure
#define DRIVER_PMS3003_LINK_UART_INIT(HANDLE, FUC)
 link uart_init function
#define DRIVER_PMS3003_LINK_UART_DEINIT(HANDLE, FUC)
 link uart_deinit function
#define DRIVER_PMS3003_LINK_UART_READ(HANDLE, FUC)
 link uart_read function
#define DRIVER_PMS3003_LINK_UART_WRITE(HANDLE, FUC)
 link uart_write function
#define DRIVER_PMS3003_LINK_UART_FLUSH(HANDLE, FUC)
 link uart_flush function
#define DRIVER_PMS3003_LINK_RESET_GPIO_INIT(HANDLE, FUC)
 link reset_gpio_init function
#define DRIVER_PMS3003_LINK_RESET_GPIO_DEINIT(HANDLE, FUC)
 link reset_gpio_deinit function
#define DRIVER_PMS3003_LINK_RESET_GPIO_WRITE(HANDLE, FUC)
 link reset_gpio_write function
#define DRIVER_PMS3003_LINK_SET_GPIO_INIT(HANDLE, FUC)
 link set_gpio_init function
#define DRIVER_PMS3003_LINK_SET_GPIO_DEINIT(HANDLE, FUC)
 link set_gpio_deinit function
#define DRIVER_PMS3003_LINK_SET_GPIO_WRITE(HANDLE, FUC)
 link set_gpio_write function
#define DRIVER_PMS3003_LINK_DELAY_MS(HANDLE, FUC)
 link delay_ms function
#define DRIVER_PMS3003_LINK_DEBUG_PRINT(HANDLE, FUC)
 link debug_print function

Typedefs

typedef struct pms3003_data_s pms3003_data_t
 pms3003 data structure definition
typedef struct pms3003_handle_s pms3003_handle_t
 pms3003 handle structure definition
typedef struct pms3003_info_s pms3003_info_t
 pms3003 information structure definition

Enumerations

enum  pms3003_hard_mode_t { PMS3003_HARD_MODE_SLEEP = 0x00 , PMS3003_HARD_MODE_NORMAL = 0x01 }
 pms3003 hard mode enumeration definition More...
enum  pms3003_mode_t { PMS3003_MODE_PASSIVE = 0x00 , PMS3003_MODE_ACTIVE = 0x01 }
 pms3003 mode enumeration definition More...

Functions

uint8_t pms3003_info (pms3003_info_t *info)
 get chip's information
uint8_t pms3003_init (pms3003_handle_t *handle)
 initialize the chip
uint8_t pms3003_deinit (pms3003_handle_t *handle)
 close the chip
uint8_t pms3003_read (pms3003_handle_t *handle, pms3003_data_t *data)
 read the data
uint8_t pms3003_reset (pms3003_handle_t *handle)
 reset
uint8_t pms3003_set_hard_mode (pms3003_handle_t *handle, pms3003_hard_mode_t mode)
 set hard mode
uint8_t pms3003_set_mode (pms3003_handle_t *handle, pms3003_mode_t mode)
 set mode
uint8_t pms3003_sleep (pms3003_handle_t *handle)
 sleep
uint8_t pms3003_wake_up (pms3003_handle_t *handle)
 wake up
uint8_t pms3003_set_buffer (pms3003_handle_t *handle, uint8_t *buf, uint16_t len)
 set buffer
uint8_t pms3003_get_buffer (pms3003_handle_t *handle, uint8_t *buf, uint16_t len)
 get buffer

Detailed Description

driver pms3003 header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version
1.0.0
Author
Shifeng Li
Date
2026-08-15

history

Date Version Author Description
2026/08/15 1.0 Shifeng Li first upload

Definition in file driver_pms3003.h.