LibDriver JED1XX
Loading...
Searching...
No Matches
jed1xx base driver function

jed1xx base driver modules More...

Collaboration diagram for jed1xx base driver function:

Data Structures

struct  jed1xx_handle_s
 jed1xx handle structure definition More...
struct  jed1xx_info_s
 jed1xx information structure definition More...

Typedefs

typedef struct jed1xx_handle_s jed1xx_handle_t
 jed1xx handle structure definition
typedef struct jed1xx_info_s jed1xx_info_t
 jed1xx information structure definition

Enumerations

enum  jed1xx_type_t {
  JED1XX_TYPE_101_VOC = 100 , JED1XX_TYPE_103_H2 = 5000 , JED1XX_TYPE_104_C0 = 500 , JED1XX_TYPE_105_NH3 = 300 ,
  JED1XX_TYPE_106_H2S = 3 , JED1XX_TYPE_107_C2H5OH = 500 , JED1XX_TYPE_109_C3H8 = 10000 , JED1XX_TYPE_110_CF2CL2 = 1000 ,
  JED1XX_TYPE_112_NO2 = 10 , JED1XX_TYPE_115_SMOG = 10000 , JED1XX_TYPE_116_CH2O = 100 , JED1XX_TYPE_117_CH3COCH3 = 500 ,
  JED1XX_TYPE_131_O3 = 100 , JED1XX_TYPE_138_C6H6 = 100
}
 jed1xx type enumeration definition More...

Functions

uint8_t jed1xx_info (jed1xx_info_t *info)
 get chip's information
uint8_t jed1xx_set_type (jed1xx_handle_t *handle, jed1xx_type_t type)
 set the chip type
uint8_t jed1xx_get_type (jed1xx_handle_t *handle, jed1xx_type_t *type)
 get the chip type
uint8_t jed1xx_init (jed1xx_handle_t *handle)
 initialize the chip
uint8_t jed1xx_deinit (jed1xx_handle_t *handle)
 close the chip
uint8_t jed1xx_read (jed1xx_handle_t *handle, uint16_t *raw, float *ppm)
 read data

Detailed Description

jed1xx base driver modules

Typedef Documentation

◆ jed1xx_handle_t

jed1xx handle structure definition

◆ jed1xx_info_t

typedef struct jed1xx_info_s jed1xx_info_t

jed1xx information structure definition

Enumeration Type Documentation

◆ jed1xx_type_t

jed1xx type enumeration definition

Enumerator
JED1XX_TYPE_101_VOC 

jed101 voc

JED1XX_TYPE_103_H2 

jed103 h2

JED1XX_TYPE_104_C0 

jed104 co

JED1XX_TYPE_105_NH3 

jed105 nh3

JED1XX_TYPE_106_H2S 

jed106 h2s

JED1XX_TYPE_107_C2H5OH 

jed107 c2h50h

JED1XX_TYPE_109_C3H8 

jed109 c3h8

JED1XX_TYPE_110_CF2CL2 

jed110 cf2cl2

JED1XX_TYPE_112_NO2 

jed112 no2

JED1XX_TYPE_115_SMOG 

jed115 smog

JED1XX_TYPE_116_CH2O 

jed116 ch2o

JED1XX_TYPE_117_CH3COCH3 

jed117 ch3coch3

JED1XX_TYPE_131_O3 

jed131 o3

JED1XX_TYPE_138_C6H6 

jed138 c6h6

Definition at line 62 of file driver_jed1xx.h.

Function Documentation

◆ jed1xx_deinit()

uint8_t jed1xx_deinit ( jed1xx_handle_t * handle)

close the chip

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

Definition at line 212 of file driver_jed1xx.c.

◆ jed1xx_get_type()

uint8_t jed1xx_get_type ( jed1xx_handle_t * handle,
jed1xx_type_t * type )

get the chip type

Parameters
[in]*handlepointer to a jed1xx handle structure
[out]*typepointer to a chip type buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 128 of file driver_jed1xx.c.

◆ jed1xx_info()

uint8_t jed1xx_info ( jed1xx_info_t * info)

get chip's information

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

Definition at line 346 of file driver_jed1xx.c.

◆ jed1xx_init()

uint8_t jed1xx_init ( jed1xx_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to a jed1xx handle structure
Returns
status code
  • 0 success
  • 1 iic failed
  • 2 handle is NULL
  • 3 linked functions is NULL
Note
none

Definition at line 150 of file driver_jed1xx.c.

◆ jed1xx_read()

uint8_t jed1xx_read ( jed1xx_handle_t * handle,
uint16_t * raw,
float * ppm )

read data

Parameters
[in]*handlepointer to a jed1xx handle structure
[out]*rawpointer to a raw data buffer
[out]*ppmpointer to a converted data buffer
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 246 of file driver_jed1xx.c.

◆ jed1xx_set_type()

uint8_t jed1xx_set_type ( jed1xx_handle_t * handle,
jed1xx_type_t type )

set the chip type

Parameters
[in]*handlepointer to a jed1xx handle structure
[in]typechip type
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 107 of file driver_jed1xx.c.