LibDriver PMSX003
Loading...
Searching...
No Matches
pmsx003 basic driver function

pmsx003 basic driver modules More...

Collaboration diagram for pmsx003 basic driver function:

Data Structures

struct  pmsx003_data_s
 pmsx003 data structure definition More...
struct  pmsx003_handle_s
 pmsx003 handle structure definition More...
struct  pmsx003_info_s
 pmsx003 information structure definition More...

Typedefs

typedef struct pmsx003_data_s pmsx003_data_t
 pmsx003 data structure definition
typedef struct pmsx003_handle_s pmsx003_handle_t
 pmsx003 handle structure definition
typedef struct pmsx003_info_s pmsx003_info_t
 pmsx003 information structure definition

Enumerations

enum  pmsx003_hard_mode_t { PMSX003_HARD_MODE_SLEEP = 0x00 , PMSX003_HARD_MODE_NORMAL = 0x01 }
 pmsx003 hard mode enumeration definition More...
enum  pmsx003_mode_t { PMSX003_MODE_PASSIVE = 0x00 , PMSX003_MODE_ACTIVE = 0x01 }
 pmsx003 mode enumeration definition More...

Functions

uint8_t pmsx003_info (pmsx003_info_t *info)
 get chip's information
uint8_t pmsx003_init (pmsx003_handle_t *handle)
 initialize the chip
uint8_t pmsx003_deinit (pmsx003_handle_t *handle)
 close the chip
uint8_t pmsx003_read (pmsx003_handle_t *handle, pmsx003_data_t *data)
 read the data
uint8_t pmsx003_reset (pmsx003_handle_t *handle)
 reset
uint8_t pmsx003_set_hard_mode (pmsx003_handle_t *handle, pmsx003_hard_mode_t mode)
 set hard mode
uint8_t pmsx003_set_mode (pmsx003_handle_t *handle, pmsx003_mode_t mode)
 set mode
uint8_t pmsx003_sleep (pmsx003_handle_t *handle)
 sleep
uint8_t pmsx003_wake_up (pmsx003_handle_t *handle)
 wake up

Detailed Description

pmsx003 basic driver modules

Typedef Documentation

◆ pmsx003_data_t

pmsx003 data structure definition

◆ pmsx003_handle_t

pmsx003 handle structure definition

◆ pmsx003_info_t

pmsx003 information structure definition

Enumeration Type Documentation

◆ pmsx003_hard_mode_t

pmsx003 hard mode enumeration definition

Enumerator
PMSX003_HARD_MODE_SLEEP 

sleep mode

PMSX003_HARD_MODE_NORMAL 

normal mode

Definition at line 62 of file driver_pmsx003.h.

◆ pmsx003_mode_t

pmsx003 mode enumeration definition

Enumerator
PMSX003_MODE_PASSIVE 

passive mode

PMSX003_MODE_ACTIVE 

active mode

Definition at line 71 of file driver_pmsx003.h.

Function Documentation

◆ pmsx003_deinit()

uint8_t pmsx003_deinit ( pmsx003_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to a pmsx003 handle structure
Returns
status code
  • 0 success
  • 1 uart or gpio deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 375 of file driver_pmsx003.c.

◆ pmsx003_info()

uint8_t pmsx003_info ( pmsx003_info_t * info)

get chip's information

Parameters
[out]*infopointer to a pmsx003 info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 865 of file driver_pmsx003.c.

◆ pmsx003_init()

uint8_t pmsx003_init ( pmsx003_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to a pmsx003 handle structure
Returns
status code
  • 0 success
  • 1 uart or gpio initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
Note
none

Definition at line 213 of file driver_pmsx003.c.

◆ pmsx003_read()

uint8_t pmsx003_read ( pmsx003_handle_t * handle,
pmsx003_data_t * data )

read the data

Parameters
[in]*handlepointer to a pmsx003 handle structure
[out]*datapointer to a data structure
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 frame error
  • 5 data error
Note
none

Definition at line 689 of file driver_pmsx003.c.

◆ pmsx003_reset()

uint8_t pmsx003_reset ( pmsx003_handle_t * handle)

reset

Parameters
[in]*handlepointer to a pmsx003 handle structure
Returns
status code
  • 0 success
  • 1 reset failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 419 of file driver_pmsx003.c.

◆ pmsx003_set_hard_mode()

uint8_t pmsx003_set_hard_mode ( pmsx003_handle_t * handle,
pmsx003_hard_mode_t mode )

set hard mode

Parameters
[in]*handlepointer to a pmsx003 handle structure
[in]modehard mode
Returns
status code
  • 0 success
  • 1 set hard mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 459 of file driver_pmsx003.c.

◆ pmsx003_set_mode()

uint8_t pmsx003_set_mode ( pmsx003_handle_t * handle,
pmsx003_mode_t mode )

set mode

Parameters
[in]*handlepointer to a pmsx003 handle structure
[in]modechip mode
Returns
status code
  • 0 success
  • 1 set mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 frame error
Note
none

Definition at line 505 of file driver_pmsx003.c.

◆ pmsx003_sleep()

uint8_t pmsx003_sleep ( pmsx003_handle_t * handle)

sleep

Parameters
[in]*handlepointer to a pmsx003 handle structure
Returns
status code
  • 0 success
  • 1 sleep failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 frame error
Note
none

Definition at line 574 of file driver_pmsx003.c.

◆ pmsx003_wake_up()

uint8_t pmsx003_wake_up ( pmsx003_handle_t * handle)

wake up

Parameters
[in]*handlepointer to a pmsx003 handle structure
Returns
status code
  • 0 success
  • 1 wake up failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 frame error
Note
none

Definition at line 642 of file driver_pmsx003.c.