LibDriver MAX30205
Loading...
Searching...
No Matches
max30205 base driver function

max30205 base driver modules More...

Collaboration diagram for max30205 base driver function:

Data Structures

struct  max30205_handle_s
 max30205 handle structure definition More...
struct  max30205_info_s
 max30205 information structure definition More...

Typedefs

typedef struct max30205_handle_s max30205_handle_t
 max30205 handle structure definition
typedef struct max30205_info_s max30205_info_t
 max30205 information structure definition

Enumerations

enum  max30205_address_t {
  MAX30205_ADDRESS_0 = (uint8_t)(0x90) , MAX30205_ADDRESS_1 = (uint8_t)(0x92) , MAX30205_ADDRESS_2 = (uint8_t)(0x82) , MAX30205_ADDRESS_3 = (uint8_t)(0x80) ,
  MAX30205_ADDRESS_4 = (uint8_t)(0x94) , MAX30205_ADDRESS_5 = (uint8_t)(0x96) , MAX30205_ADDRESS_6 = (uint8_t)(0x86) , MAX30205_ADDRESS_7 = (uint8_t)(0x84) ,
  MAX30205_ADDRESS_8 = (uint8_t)(0xB4) , MAX30205_ADDRESS_9 = (uint8_t)(0xB6) , MAX30205_ADDRESS_A = (uint8_t)(0xA6) , MAX30205_ADDRESS_B = (uint8_t)(0xA4) ,
  MAX30205_ADDRESS_C = (uint8_t)(0xB0) , MAX30205_ADDRESS_D = (uint8_t)(0xB2) , MAX30205_ADDRESS_E = (uint8_t)(0xA2) , MAX30205_ADDRESS_F = (uint8_t)(0xA0) ,
  MAX30205_ADDRESS_10 = (uint8_t)(0x98) , MAX30205_ADDRESS_11 = (uint8_t)(0x9A) , MAX30205_ADDRESS_12 = (uint8_t)(0x8A) , MAX30205_ADDRESS_13 = (uint8_t)(0x88) ,
  MAX30205_ADDRESS_14 = (uint8_t)(0x9C) , MAX30205_ADDRESS_15 = (uint8_t)(0x9E) , MAX30205_ADDRESS_16 = (uint8_t)(0x8E) , MAX30205_ADDRESS_17 = (uint8_t)(0x8C) ,
  MAX30205_ADDRESS_18 = (uint8_t)(0xBC) , MAX30205_ADDRESS_19 = (uint8_t)(0xBE) , MAX30205_ADDRESS_1A = (uint8_t)(0xAE) , MAX30205_ADDRESS_1B = (uint8_t)(0xAC) ,
  MAX30205_ADDRESS_1C = (uint8_t)(0xB8) , MAX30205_ADDRESS_1D = (uint8_t)(0xBA) , MAX30205_ADDRESS_1E = (uint8_t)(0xAA) , MAX30205_ADDRESS_1F = (uint8_t)(0xA8)
}
 max30205 address enumeration definition More...
enum  max30205_data_format_t { MAX30205_DATA_FORMAT_NORMAL = 0x00 , MAX30205_DATA_FORMAT_EXTENDED = 0x01 }
 max30205 data format enumeration definition More...
enum  max30205_bus_timeout_t { MAX30205_BUS_TIMEOUT_ENABLE = 0x00 , MAX30205_BUS_TIMEOUT_DISABLE = 0x01 }
 max30205 bus timeout enumeration definition More...

Functions

uint8_t max30205_info (max30205_info_t *info)
 get chip's information
uint8_t max30205_set_addr_pin (max30205_handle_t *handle, max30205_address_t addr_pin)
 set the iic address pin
uint8_t max30205_get_addr_pin (max30205_handle_t *handle, max30205_address_t *addr_pin)
 get the iic address pin
uint8_t max30205_init (max30205_handle_t *handle)
 initialize the chip
uint8_t max30205_deinit (max30205_handle_t *handle)
 close the chip
uint8_t max30205_start_continuous_read (max30205_handle_t *handle)
 start reading data
uint8_t max30205_stop_continuous_read (max30205_handle_t *handle)
 stop reading data
uint8_t max30205_continuous_read (max30205_handle_t *handle, int16_t *raw, float *s)
 read data continuously
uint8_t max30205_single_read (max30205_handle_t *handle, int16_t *raw, float *s)
 read data once
uint8_t max30205_set_data_format (max30205_handle_t *handle, max30205_data_format_t format)
 set the chip data format
uint8_t max30205_get_data_format (max30205_handle_t *handle, max30205_data_format_t *format)
 get the chip data format
uint8_t max30205_set_bus_timeout (max30205_handle_t *handle, max30205_bus_timeout_t bus_timeout)
 set the iic bus timeout
uint8_t max30205_get_bus_timeout (max30205_handle_t *handle, max30205_bus_timeout_t *bus_timeout)
 get the iic bus timeout
uint8_t max30205_power_down (max30205_handle_t *handle)
 chip powers down

Detailed Description

max30205 base driver modules

Typedef Documentation

◆ max30205_handle_t

max30205 handle structure definition

◆ max30205_info_t

max30205 information structure definition

Enumeration Type Documentation

◆ max30205_address_t

max30205 address enumeration definition

Enumerator
MAX30205_ADDRESS_0 

A2 = GND, A1 = GND, A0 = GND

MAX30205_ADDRESS_1 

A2 = GND, A1 = GND, A0 = VDD

MAX30205_ADDRESS_2 

A2 = GND, A1 = GND, A0 = SCL

MAX30205_ADDRESS_3 

A2 = GND, A1 = GND, A0 = SDA

MAX30205_ADDRESS_4 

A2 = GND, A1 = VDD, A0 = GND

MAX30205_ADDRESS_5 

A2 = GND, A1 = VDD, A0 = VDD

MAX30205_ADDRESS_6 

A2 = GND, A1 = VDD, A0 = SCL

MAX30205_ADDRESS_7 

A2 = GND, A1 = VDD, A0 = SDA

MAX30205_ADDRESS_8 

A2 = GND, A1 = SCL, A0 = GND

MAX30205_ADDRESS_9 

A2 = GND, A1 = SCL, A0 = VDD

MAX30205_ADDRESS_A 

A2 = GND, A1 = SCL, A0 = SCL

MAX30205_ADDRESS_B 

A2 = GND, A1 = SCL, A0 = SDA

MAX30205_ADDRESS_C 

A2 = GND, A1 = SDA, A0 = GND

MAX30205_ADDRESS_D 

A2 = GND, A1 = SDA, A0 = VDD

MAX30205_ADDRESS_E 

A2 = GND, A1 = SDA, A0 = SCL

MAX30205_ADDRESS_F 

A2 = GND, A1 = SDA, A0 = SDA

MAX30205_ADDRESS_10 

A2 = VDD, A1 = GND, A0 = GND

MAX30205_ADDRESS_11 

A2 = VDD, A1 = GND, A0 = VDD

MAX30205_ADDRESS_12 

A2 = VDD, A1 = GND, A0 = SCL

MAX30205_ADDRESS_13 

A2 = VDD, A1 = GND, A0 = SDA

MAX30205_ADDRESS_14 

A2 = VDD, A1 = VDD, A0 = GND

MAX30205_ADDRESS_15 

A2 = VDD, A1 = VDD, A0 = VDD

MAX30205_ADDRESS_16 

A2 = VDD, A1 = VDD, A0 = SCL

MAX30205_ADDRESS_17 

A2 = VDD, A1 = GND, A0 = SDA

MAX30205_ADDRESS_18 

A2 = VDD, A1 = SCL, A0 = GND

MAX30205_ADDRESS_19 

A2 = VDD, A1 = SCL, A0 = VDD

MAX30205_ADDRESS_1A 

A2 = VDD, A1 = SCL, A0 = SCL

MAX30205_ADDRESS_1B 

A2 = VDD, A1 = SCL, A0 = SDA

MAX30205_ADDRESS_1C 

A2 = VDD, A1 = SDA, A0 = GND

MAX30205_ADDRESS_1D 

A2 = VDD, A1 = SDA, A0 = VDD

MAX30205_ADDRESS_1E 

A2 = VDD, A1 = SDA, A0 = SCL

MAX30205_ADDRESS_1F 

A2 = VDD, A1 = SDA, A0 = SDA

Definition at line 63 of file driver_max30205.h.

◆ max30205_bus_timeout_t

max30205 bus timeout enumeration definition

Enumerator
MAX30205_BUS_TIMEOUT_ENABLE 

enable bus timeout

MAX30205_BUS_TIMEOUT_DISABLE 

disable bus timeout

Definition at line 111 of file driver_max30205.h.

◆ max30205_data_format_t

max30205 data format enumeration definition

Enumerator
MAX30205_DATA_FORMAT_NORMAL 

normal format

MAX30205_DATA_FORMAT_EXTENDED 

extended format

Definition at line 102 of file driver_max30205.h.

Function Documentation

◆ max30205_continuous_read()

uint8_t max30205_continuous_read ( max30205_handle_t * handle,
int16_t * raw,
float * s )

read data continuously

Parameters
[in]*handlepointer to a max30205 handle structure
[out]*rawpointer to a raw temperature buffer
[out]*spointer to a converted temperature buffer
Returns
status code
  • 0 success
  • 1 continuous read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
this function can be used only after run max30205_start_continuous_read and can be stopped by max30205_stop_continuous_read

Definition at line 612 of file driver_max30205.c.

◆ max30205_deinit()

uint8_t max30205_deinit ( max30205_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to a max30205 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 133 of file driver_max30205.c.

◆ max30205_get_addr_pin()

uint8_t max30205_get_addr_pin ( max30205_handle_t * handle,
max30205_address_t * addr_pin )

get the iic address pin

Parameters
[in]*handlepointer to a max30205 handle structure
[out]*addr_pinpointer to a chip iic address pin buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 194 of file driver_max30205.c.

◆ max30205_get_bus_timeout()

uint8_t max30205_get_bus_timeout ( max30205_handle_t * handle,
max30205_bus_timeout_t * bus_timeout )

get the iic bus timeout

Parameters
[in]*handlepointer to a max30205 handle structure
[out]*bus_timeoutpointer to an iic bus timeout buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 501 of file driver_max30205.c.

◆ max30205_get_data_format()

uint8_t max30205_get_data_format ( max30205_handle_t * handle,
max30205_data_format_t * format )

get the chip data format

Parameters
[in]*handlepointer to a max30205 handle structure
[out]*formatpointer to a data format buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 249 of file driver_max30205.c.

◆ max30205_info()

uint8_t max30205_info ( max30205_info_t * info)

get chip's information

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

Definition at line 1035 of file driver_max30205.c.

◆ max30205_init()

uint8_t max30205_init ( max30205_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to a max30205 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 70 of file driver_max30205.c.

◆ max30205_power_down()

uint8_t max30205_power_down ( max30205_handle_t * handle)

chip powers down

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

Definition at line 929 of file driver_max30205.c.

◆ max30205_set_addr_pin()

uint8_t max30205_set_addr_pin ( max30205_handle_t * handle,
max30205_address_t addr_pin )

set the iic address pin

Parameters
[in]*handlepointer to a max30205 handle structure
[in]addr_pinchip iic address pin
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 173 of file driver_max30205.c.

◆ max30205_set_bus_timeout()

uint8_t max30205_set_bus_timeout ( max30205_handle_t * handle,
max30205_bus_timeout_t bus_timeout )

set the iic bus timeout

Parameters
[in]*handlepointer to a max30205 handle structure
[in]bus_timeoutiic bus timeout
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 468 of file driver_max30205.c.

◆ max30205_set_data_format()

uint8_t max30205_set_data_format ( max30205_handle_t * handle,
max30205_data_format_t format )

set the chip data format

Parameters
[in]*handlepointer to a max30205 handle structure
[in]formatdata format
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 216 of file driver_max30205.c.

◆ max30205_single_read()

uint8_t max30205_single_read ( max30205_handle_t * handle,
int16_t * raw,
float * s )

read data once

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

Definition at line 658 of file driver_max30205.c.

◆ max30205_start_continuous_read()

uint8_t max30205_start_continuous_read ( max30205_handle_t * handle)

start reading data

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

Definition at line 534 of file driver_max30205.c.

◆ max30205_stop_continuous_read()

uint8_t max30205_stop_continuous_read ( max30205_handle_t * handle)

stop reading data

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

Definition at line 571 of file driver_max30205.c.