LibDriver AFS01
Loading...
Searching...
No Matches
afs01 base driver function

afs01 base driver modules More...

Collaboration diagram for afs01 base driver function:

Data Structures

struct  afs01_handle_s
 afs01 handle structure definition More...
struct  afs01_info_s
 afs01 information structure definition More...

Typedefs

typedef struct afs01_handle_s afs01_handle_t
 afs01 handle structure definition
typedef struct afs01_info_s afs01_info_t
 afs01 information structure definition

Functions

uint8_t afs01_info (afs01_info_t *info)
 get chip's information
uint8_t afs01_init (afs01_handle_t *handle)
 initialize the chip
uint8_t afs01_deinit (afs01_handle_t *handle)
 close the chip
uint8_t afs01_read (afs01_handle_t *handle, uint16_t *raw, float *sccm)
 read data
uint8_t afs01_get_chip_id (afs01_handle_t *handle, uint8_t id[4])
 get chip id

Detailed Description

afs01 base driver modules

Typedef Documentation

◆ afs01_handle_t

afs01 handle structure definition

◆ afs01_info_t

typedef struct afs01_info_s afs01_info_t

afs01 information structure definition

Function Documentation

◆ afs01_deinit()

uint8_t afs01_deinit ( afs01_handle_t * handle)

close the chip

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

Definition at line 174 of file driver_afs01.c.

◆ afs01_get_chip_id()

uint8_t afs01_get_chip_id ( afs01_handle_t * handle,
uint8_t id[4] )

get chip id

Parameters
[in]*handlepointer to an afs01 handle structure
[out]*idpointer to an id buffer
Returns
status code
  • 0 success
  • 1 get chip id failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 crc error
Note
none

Definition at line 254 of file driver_afs01.c.

◆ afs01_info()

uint8_t afs01_info ( afs01_info_t * info)

get chip's information

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

Definition at line 335 of file driver_afs01.c.

◆ afs01_init()

uint8_t afs01_init ( afs01_handle_t * handle)

initialize the chip

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

Definition at line 118 of file driver_afs01.c.

◆ afs01_read()

uint8_t afs01_read ( afs01_handle_t * handle,
uint16_t * raw,
float * sccm )

read data

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

Definition at line 209 of file driver_afs01.c.