LibDriver BMP390
Loading...
Searching...
No Matches
bmp390 base driver function

bmp390 base driver modules More...

Collaboration diagram for bmp390 base driver function:

Data Structures

struct  bmp390_frame_s
 bmp390 frame structure definition More...
struct  bmp390_handle_s
 bmp390 handle structure definition More...
struct  bmp390_info_s
 bmp390 information structure definition More...

Typedefs

typedef struct bmp390_frame_s bmp390_frame_t
 bmp390 frame structure definition
typedef struct bmp390_handle_s bmp390_handle_t
 bmp390 handle structure definition
typedef struct bmp390_info_s bmp390_info_t
 bmp390 information structure definition

Enumerations

enum  bmp390_interface_t { BMP390_INTERFACE_IIC = 0x00 , BMP390_INTERFACE_SPI = 0x01 }
 bmp390 interface enumeration definition More...
enum  bmp390_address_t { BMP390_ADDRESS_ADO_LOW = (0x76 << 1) , BMP390_ADDRESS_ADO_HIGH = (0x77 << 1) }
 bmp390 address enumeration definition More...
enum  bmp390_bool_t { BMP390_BOOL_FALSE = 0x00 , BMP390_BOOL_TRUE = 0x01 }
 bmp390 bool enumeration definition More...
enum  bmp390_error_t { BMP390_ERROR_FATAL = (1 << 0) , BMP390_ERROR_CMD = (1 << 1) , BMP390_ERROR_CONF = (1 << 2) }
 bmp390 error enumeration definition More...
enum  bmp390_status_t { BMP390_STATUS_COMMAND_READY = (1 << 4) , BMP390_STATUS_PRESS_READY = (1 << 5) , BMP390_STATUS_TEMP_READY = (1 << 6) }
 bmp390 status enumeration definition More...
enum  bmp390_event_t { BMP390_EVENT_NONE = (0 << 0) , BMP390_EVENT_POWER_UP_OR_SOFTRESET = (1 << 0) , BMP390_EVENT_ITF_ACT_PT = (1 << 1) , BMP390_EVENT_BOTH = (3 << 0) }
 bmp390 event enumeration definition More...
enum  bmp390_fifo_data_source_t { BMP390_FIFO_DATA_SOURCE_UNFILTERED = 0 , BMP390_FIFO_DATA_SOURCE_FILTERED = 1 }
 bmp390 fifo data source enumeration definition More...
enum  bmp390_interrupt_status_t { BMP390_INTERRUPT_STATUS_FIFO_WATERMARK = (1 << 0) , BMP390_INTERRUPT_STATUS_FIFO_FULL = (1 << 1) , BMP390_INTERRUPT_STATUS_DATA_READY = (1 << 3) }
 bmp390 interrupt status enumeration definition More...
enum  bmp390_interrupt_active_level_t { BMP390_INTERRUPT_ACTIVE_LEVEL_LOWER = 0x00 , BMP390_INTERRUPT_ACTIVE_LEVEL_HIGHER = 0x01 }
 bmp390 interrupt active level enumeration definition More...
enum  bmp390_interrupt_pin_type_t { BMP390_INTERRUPT_PIN_TYPE_PUSH_PULL = 0x00 , BMP390_INTERRUPT_PIN_TYPE_OPEN_DRAIN = 0x01 }
 bmp390 interrupt pin type enumeration definition More...
enum  bmp390_spi_wire_t { BMP390_SPI_WIRE_4 = 0x00 , BMP390_SPI_WIRE_3 = 0x01 }
 bmp390 spi wire enumeration definition More...
enum  bmp390_iic_watchdog_period_t { BMP390_IIC_WATCHDOG_PERIOD_1P25_MS = 0x00 , BMP390_IIC_WATCHDOG_PERIOD_40_MS = 0x01 }
 bmp390 iic watchdog period enumeration definition More...
enum  bmp390_mode_t { BMP390_MODE_SLEEP_MODE = 0x00 , BMP390_MODE_FORCED_MODE = 0x01 , BMP390_MODE_NORMAL_MODE = 0x03 }
 bmp390 mode enumeration definition More...
enum  bmp390_oversampling_t {
  BMP390_OVERSAMPLING_x1 = 0x00 , BMP390_OVERSAMPLING_x2 = 0x01 , BMP390_OVERSAMPLING_x4 = 0x02 , BMP390_OVERSAMPLING_x8 = 0x03 ,
  BMP390_OVERSAMPLING_x16 = 0x04 , BMP390_OVERSAMPLING_x32 = 0x05
}
 bmp390 oversampling enumeration definition More...
enum  bmp390_odr_t {
  BMP390_ODR_200_HZ = 0x00 , BMP390_ODR_100_HZ = 0x01 , BMP390_ODR_50_HZ = 0x02 , BMP390_ODR_25_HZ = 0x03 ,
  BMP390_ODR_12P5_HZ = 0x04 , BMP390_ODR_6P25_HZ = 0x05 , BMP390_ODR_3P1_HZ = 0x06 , BMP390_ODR_1P5_HZ = 0x07 ,
  BMP390_ODR_0P78_HZ = 0x08 , BMP390_ODR_0P39_HZ = 0x09 , BMP390_ODR_0P2_HZ = 0x0A , BMP390_ODR_0P1_HZ = 0x0B ,
  BMP390_ODR_0P05_HZ = 0x0C , BMP390_ODR_0P02_HZ = 0x0D , BMP390_ODR_0P01_HZ = 0x0E , BMP390_ODR_0P006_HZ = 0x0F ,
  BMP390_ODR_0P003_HZ = 0x10 , BMP390_ODR_0P0015_HZ = 0x11
}
 bmp390 output data rate enumeration definition More...
enum  bmp390_filter_coefficient_t {
  BMP390_FILTER_COEFFICIENT_0 = 0x00 , BMP390_FILTER_COEFFICIENT_1 = 0x01 , BMP390_FILTER_COEFFICIENT_3 = 0x02 , BMP390_FILTER_COEFFICIENT_7 = 0x03 ,
  BMP390_FILTER_COEFFICIENT_15 = 0x04 , BMP390_FILTER_COEFFICIENT_31 = 0x05 , BMP390_FILTER_COEFFICIENT_63 = 0x06 , BMP390_FILTER_COEFFICIENT_127 = 0x07
}
 bmp390 filter coefficient enumeration definition More...
enum  bmp390_frame_type_t { BMP390_FRAME_TYPE_TEMPERATURE = 0x01 , BMP390_FRAME_TYPE_PRESSURE = 0x02 , BMP390_FRAME_TYPE_SENSORTIME = 0x03 }
 bmp390 frame type enumeration definition More...

Functions

uint8_t bmp390_info (bmp390_info_t *info)
 get chip's information
uint8_t bmp390_set_addr_pin (bmp390_handle_t *handle, bmp390_address_t addr_pin)
 set the iic address pin
uint8_t bmp390_get_addr_pin (bmp390_handle_t *handle, bmp390_address_t *addr_pin)
 get the iic address pin
uint8_t bmp390_set_interface (bmp390_handle_t *handle, bmp390_interface_t interface)
 set the interface
uint8_t bmp390_get_interface (bmp390_handle_t *handle, bmp390_interface_t *interface)
 get the interface
uint8_t bmp390_irq_handler (bmp390_handle_t *handle)
 irq handler
uint8_t bmp390_init (bmp390_handle_t *handle)
 initialize the chip
uint8_t bmp390_deinit (bmp390_handle_t *handle)
 close the chip
uint8_t bmp390_read_temperature_pressure (bmp390_handle_t *handle, uint32_t *temperature_raw, float *temperature_c, uint32_t *pressure_raw, float *pressure_pa)
 read the temperature and pressure
uint8_t bmp390_read_temperature (bmp390_handle_t *handle, uint32_t *raw, float *c)
 read the temperature
uint8_t bmp390_read_pressure (bmp390_handle_t *handle, uint32_t *raw, float *pa)
 read the pressure
uint8_t bmp390_get_revision_id (bmp390_handle_t *handle, uint8_t *id)
 get the revision id
uint8_t bmp390_get_error (bmp390_handle_t *handle, uint8_t *err)
 get the error
uint8_t bmp390_get_status (bmp390_handle_t *handle, uint8_t *status)
 get the status
uint8_t bmp390_get_sensortime (bmp390_handle_t *handle, uint32_t *t)
 get the sensor time
uint8_t bmp390_get_event (bmp390_handle_t *handle, bmp390_event_t *event)
 get the event
uint8_t bmp390_set_spi_wire (bmp390_handle_t *handle, bmp390_spi_wire_t wire)
 set the spi wire
uint8_t bmp390_get_spi_wire (bmp390_handle_t *handle, bmp390_spi_wire_t *wire)
 get the spi wire
uint8_t bmp390_set_iic_watchdog_timer (bmp390_handle_t *handle, bmp390_bool_t enable)
 enable or disable the iic watchdog timer
uint8_t bmp390_get_iic_watchdog_timer (bmp390_handle_t *handle, bmp390_bool_t *enable)
 get the iic watchdog timer status
uint8_t bmp390_set_iic_watchdog_period (bmp390_handle_t *handle, bmp390_iic_watchdog_period_t period)
 set the iic watchdog period
uint8_t bmp390_get_iic_watchdog_period (bmp390_handle_t *handle, bmp390_iic_watchdog_period_t *period)
 get the iic watchdog period
uint8_t bmp390_set_pressure (bmp390_handle_t *handle, bmp390_bool_t enable)
 enable or disable the pressure
uint8_t bmp390_get_pressure (bmp390_handle_t *handle, bmp390_bool_t *enable)
 get the pressure status
uint8_t bmp390_set_temperature (bmp390_handle_t *handle, bmp390_bool_t enable)
 enable or disable the temperature
uint8_t bmp390_get_temperature (bmp390_handle_t *handle, bmp390_bool_t *enable)
 get the temperature status
uint8_t bmp390_set_mode (bmp390_handle_t *handle, bmp390_mode_t mode)
 set the chip mode
uint8_t bmp390_get_mode (bmp390_handle_t *handle, bmp390_mode_t *mode)
 get the chip mode
uint8_t bmp390_set_pressure_oversampling (bmp390_handle_t *handle, bmp390_oversampling_t oversampling)
 set the pressure oversampling
uint8_t bmp390_get_pressure_oversampling (bmp390_handle_t *handle, bmp390_oversampling_t *oversampling)
 get the pressure oversampling
uint8_t bmp390_set_temperature_oversampling (bmp390_handle_t *handle, bmp390_oversampling_t oversampling)
 set the temperature oversampling
uint8_t bmp390_get_temperature_oversampling (bmp390_handle_t *handle, bmp390_oversampling_t *oversampling)
 get the temperature oversampling
uint8_t bmp390_set_odr (bmp390_handle_t *handle, bmp390_odr_t odr)
 set the output data rate
uint8_t bmp390_get_odr (bmp390_handle_t *handle, bmp390_odr_t *odr)
 get the output data rate
uint8_t bmp390_set_filter_coefficient (bmp390_handle_t *handle, bmp390_filter_coefficient_t coefficient)
 set the filter coefficient
uint8_t bmp390_get_filter_coefficient (bmp390_handle_t *handle, bmp390_filter_coefficient_t *coefficient)
 get the filter coefficient
uint8_t bmp390_softreset (bmp390_handle_t *handle)
 soft reset

Detailed Description

bmp390 base driver modules

Typedef Documentation

◆ bmp390_frame_t

bmp390 frame structure definition

◆ bmp390_handle_t

bmp390 handle structure definition

◆ bmp390_info_t

typedef struct bmp390_info_s bmp390_info_t

bmp390 information structure definition

Enumeration Type Documentation

◆ bmp390_address_t

bmp390 address enumeration definition

Enumerator
BMP390_ADDRESS_ADO_LOW 

ADO is low

BMP390_ADDRESS_ADO_HIGH 

ADO is HIGH

Definition at line 71 of file driver_bmp390.h.

◆ bmp390_bool_t

bmp390 bool enumeration definition

Enumerator
BMP390_BOOL_FALSE 

false

BMP390_BOOL_TRUE 

true

Definition at line 80 of file driver_bmp390.h.

◆ bmp390_error_t

bmp390 error enumeration definition

Enumerator
BMP390_ERROR_FATAL 

fatal error

BMP390_ERROR_CMD 

command error

BMP390_ERROR_CONF 

conf error

Definition at line 89 of file driver_bmp390.h.

◆ bmp390_event_t

bmp390 event enumeration definition

Enumerator
BMP390_EVENT_NONE 

event none

BMP390_EVENT_POWER_UP_OR_SOFTRESET 

event power up or soft reset

BMP390_EVENT_ITF_ACT_PT 

a serial interface transaction occurs during a conversion

BMP390_EVENT_BOTH 

event power up or soft reset && a serial interface transaction occurs during a conversion

Definition at line 109 of file driver_bmp390.h.

◆ bmp390_fifo_data_source_t

bmp390 fifo data source enumeration definition

Enumerator
BMP390_FIFO_DATA_SOURCE_UNFILTERED 

fifo data source unfiltered

BMP390_FIFO_DATA_SOURCE_FILTERED 

fifo data source filtered

Definition at line 121 of file driver_bmp390.h.

◆ bmp390_filter_coefficient_t

bmp390 filter coefficient enumeration definition

Enumerator
BMP390_FILTER_COEFFICIENT_0 

coefficient 0

BMP390_FILTER_COEFFICIENT_1 

coefficient 1

BMP390_FILTER_COEFFICIENT_3 

coefficient 3

BMP390_FILTER_COEFFICIENT_7 

coefficient 7

BMP390_FILTER_COEFFICIENT_15 

coefficient 15

BMP390_FILTER_COEFFICIENT_31 

coefficient 31

BMP390_FILTER_COEFFICIENT_63 

coefficient 63

BMP390_FILTER_COEFFICIENT_127 

coefficient 127

Definition at line 224 of file driver_bmp390.h.

◆ bmp390_frame_type_t

bmp390 frame type enumeration definition

Enumerator
BMP390_FRAME_TYPE_TEMPERATURE 

temperature frame type

BMP390_FRAME_TYPE_PRESSURE 

pressure frame type

BMP390_FRAME_TYPE_SENSORTIME 

sensor time frame type

Definition at line 239 of file driver_bmp390.h.

◆ bmp390_iic_watchdog_period_t

bmp390 iic watchdog period enumeration definition

Enumerator
BMP390_IIC_WATCHDOG_PERIOD_1P25_MS 

iic watchdog period 1.25 ms

BMP390_IIC_WATCHDOG_PERIOD_40_MS 

iic watchdog period 40 ms

Definition at line 167 of file driver_bmp390.h.

◆ bmp390_interface_t

bmp390 interface enumeration definition

Enumerator
BMP390_INTERFACE_IIC 

iic interface

BMP390_INTERFACE_SPI 

spi interface

Definition at line 62 of file driver_bmp390.h.

◆ bmp390_interrupt_active_level_t

bmp390 interrupt active level enumeration definition

Enumerator
BMP390_INTERRUPT_ACTIVE_LEVEL_LOWER 

active level lower

BMP390_INTERRUPT_ACTIVE_LEVEL_HIGHER 

active level higher

Definition at line 140 of file driver_bmp390.h.

◆ bmp390_interrupt_pin_type_t

bmp390 interrupt pin type enumeration definition

Enumerator
BMP390_INTERRUPT_PIN_TYPE_PUSH_PULL 

push pull pin type

BMP390_INTERRUPT_PIN_TYPE_OPEN_DRAIN 

open drain pin type

Definition at line 149 of file driver_bmp390.h.

◆ bmp390_interrupt_status_t

bmp390 interrupt status enumeration definition

Enumerator
BMP390_INTERRUPT_STATUS_FIFO_WATERMARK 

fifo watermark interrupt status

BMP390_INTERRUPT_STATUS_FIFO_FULL 

fifo full interrupt status

BMP390_INTERRUPT_STATUS_DATA_READY 

data ready interrupt status

Definition at line 130 of file driver_bmp390.h.

◆ bmp390_mode_t

bmp390 mode enumeration definition

Enumerator
BMP390_MODE_SLEEP_MODE 

sleep mode

BMP390_MODE_FORCED_MODE 

forced mode

BMP390_MODE_NORMAL_MODE 

normal mode

Definition at line 176 of file driver_bmp390.h.

◆ bmp390_odr_t

bmp390 output data rate enumeration definition

Enumerator
BMP390_ODR_200_HZ 

200Hz

BMP390_ODR_100_HZ 

100Hz

BMP390_ODR_50_HZ 

50Hz

BMP390_ODR_25_HZ 

25Hz

BMP390_ODR_12P5_HZ 

12.5Hz

BMP390_ODR_6P25_HZ 

6.25Hz

BMP390_ODR_3P1_HZ 

3.1Hz

BMP390_ODR_1P5_HZ 

1.5Hz

BMP390_ODR_0P78_HZ 

0.78Hz

BMP390_ODR_0P39_HZ 

0.39Hz

BMP390_ODR_0P2_HZ 

0.2Hz

BMP390_ODR_0P1_HZ 

0.1Hz

BMP390_ODR_0P05_HZ 

0.05Hz

BMP390_ODR_0P02_HZ 

0.02Hz

BMP390_ODR_0P01_HZ 

0.01Hz

BMP390_ODR_0P006_HZ 

0.006Hz

BMP390_ODR_0P003_HZ 

0.003Hz

BMP390_ODR_0P0015_HZ 

0.0015Hz

Definition at line 199 of file driver_bmp390.h.

◆ bmp390_oversampling_t

bmp390 oversampling enumeration definition

Enumerator
BMP390_OVERSAMPLING_x1 

oversampling x1

BMP390_OVERSAMPLING_x2 

oversampling x2

BMP390_OVERSAMPLING_x4 

oversampling x4

BMP390_OVERSAMPLING_x8 

oversampling x8

BMP390_OVERSAMPLING_x16 

oversampling x16

BMP390_OVERSAMPLING_x32 

oversampling x32

Definition at line 186 of file driver_bmp390.h.

◆ bmp390_spi_wire_t

bmp390 spi wire enumeration definition

Enumerator
BMP390_SPI_WIRE_4 

4 wire

BMP390_SPI_WIRE_3 

3 wire

Definition at line 158 of file driver_bmp390.h.

◆ bmp390_status_t

bmp390 status enumeration definition

Enumerator
BMP390_STATUS_COMMAND_READY 

command ready status

BMP390_STATUS_PRESS_READY 

press ready status

BMP390_STATUS_TEMP_READY 

temp ready status

Definition at line 99 of file driver_bmp390.h.

Function Documentation

◆ bmp390_deinit()

uint8_t bmp390_deinit ( bmp390_handle_t * handle)

close the chip

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

Definition at line 2904 of file driver_bmp390.c.

◆ bmp390_get_addr_pin()

uint8_t bmp390_get_addr_pin ( bmp390_handle_t * handle,
bmp390_address_t * addr_pin )

get the iic address pin

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

Definition at line 3593 of file driver_bmp390.c.

◆ bmp390_get_error()

uint8_t bmp390_get_error ( bmp390_handle_t * handle,
uint8_t * err )

get the error

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*errpointer to an error buffer
Returns
status code
  • 0 success
  • 1 get error failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 423 of file driver_bmp390.c.

◆ bmp390_get_event()

uint8_t bmp390_get_event ( bmp390_handle_t * handle,
bmp390_event_t * event )

get the event

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*eventpointer to an event buffer
Returns
status code
  • 0 success
  • 1 get event failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 530 of file driver_bmp390.c.

◆ bmp390_get_filter_coefficient()

uint8_t bmp390_get_filter_coefficient ( bmp390_handle_t * handle,
bmp390_filter_coefficient_t * coefficient )

get the filter coefficient

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*coefficientpointer to a filter coefficient buffer
Returns
status code
  • 0 success
  • 1 get filter coefficient failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2607 of file driver_bmp390.c.

◆ bmp390_get_iic_watchdog_period()

uint8_t bmp390_get_iic_watchdog_period ( bmp390_handle_t * handle,
bmp390_iic_watchdog_period_t * period )

get the iic watchdog period

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*periodpointer to an iic watchdog period buffer
Returns
status code
  • 0 success
  • 1 get iic watchdog period failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2031 of file driver_bmp390.c.

◆ bmp390_get_iic_watchdog_timer()

uint8_t bmp390_get_iic_watchdog_timer ( bmp390_handle_t * handle,
bmp390_bool_t * enable )

get the iic watchdog timer status

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*enablepointer to a bool buffer
Returns
status code
  • 0 success
  • 1 get iic watchdog timer failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1949 of file driver_bmp390.c.

◆ bmp390_get_interface()

uint8_t bmp390_get_interface ( bmp390_handle_t * handle,
bmp390_interface_t * interface )

get the interface

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

Definition at line 3635 of file driver_bmp390.c.

◆ bmp390_get_mode()

uint8_t bmp390_get_mode ( bmp390_handle_t * handle,
bmp390_mode_t * mode )

get the chip mode

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*modepointer to a mode buffer
Returns
status code
  • 0 success
  • 1 get mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2277 of file driver_bmp390.c.

◆ bmp390_get_odr()

uint8_t bmp390_get_odr ( bmp390_handle_t * handle,
bmp390_odr_t * odr )

get the output data rate

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*odrpointer to an output data rate buffer
Returns
status code
  • 0 success
  • 1 get odr failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2524 of file driver_bmp390.c.

◆ bmp390_get_pressure()

uint8_t bmp390_get_pressure ( bmp390_handle_t * handle,
bmp390_bool_t * enable )

get the pressure status

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*enablepointer to a bool buffer
Returns
status code
  • 0 success
  • 1 get pressure failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2113 of file driver_bmp390.c.

◆ bmp390_get_pressure_oversampling()

uint8_t bmp390_get_pressure_oversampling ( bmp390_handle_t * handle,
bmp390_oversampling_t * oversampling )

get the pressure oversampling

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*oversamplingpointer to an oversampling buffer
Returns
status code
  • 0 success
  • 1 get pressure oversampling failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2359 of file driver_bmp390.c.

◆ bmp390_get_revision_id()

uint8_t bmp390_get_revision_id ( bmp390_handle_t * handle,
uint8_t * id )

get the revision id

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*idpointer to an id buffer
Returns
status code
  • 0 success
  • 1 get revision id failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 388 of file driver_bmp390.c.

◆ bmp390_get_sensortime()

uint8_t bmp390_get_sensortime ( bmp390_handle_t * handle,
uint32_t * t )

get the sensor time

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*tpointer to a timestamp buffer
Returns
status code
  • 0 success
  • 1 get sensor time failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 493 of file driver_bmp390.c.

◆ bmp390_get_spi_wire()

uint8_t bmp390_get_spi_wire ( bmp390_handle_t * handle,
bmp390_spi_wire_t * wire )

get the spi wire

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*wirepointer to a spi wire buffer
Returns
status code
  • 0 success
  • 1 get spi wire failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1867 of file driver_bmp390.c.

◆ bmp390_get_status()

uint8_t bmp390_get_status ( bmp390_handle_t * handle,
uint8_t * status )

get the status

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*statuspointer to a status buffer
Returns
status code
  • 0 success
  • 1 get status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 458 of file driver_bmp390.c.

◆ bmp390_get_temperature()

uint8_t bmp390_get_temperature ( bmp390_handle_t * handle,
bmp390_bool_t * enable )

get the temperature status

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*enablepointer to a bool buffer
Returns
status code
  • 0 success
  • 1 get temperature failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2195 of file driver_bmp390.c.

◆ bmp390_get_temperature_oversampling()

uint8_t bmp390_get_temperature_oversampling ( bmp390_handle_t * handle,
bmp390_oversampling_t * oversampling )

get the temperature oversampling

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*oversamplingpointer to an oversampling buffer
Returns
status code
  • 0 success
  • 1 get temperature oversampling failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2441 of file driver_bmp390.c.

◆ bmp390_info()

uint8_t bmp390_info ( bmp390_info_t * info)

get chip's information

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

Definition at line 3903 of file driver_bmp390.c.

◆ bmp390_init()

uint8_t bmp390_init ( bmp390_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to a bmp390 handle structure
Returns
status code
  • 0 success
  • 1 iic or spi initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 id is invalid
  • 5 reset failed
  • 6 get calibration failed
Note
none

Definition at line 2758 of file driver_bmp390.c.

◆ bmp390_irq_handler()

uint8_t bmp390_irq_handler ( bmp390_handle_t * handle)

irq handler

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

Definition at line 3517 of file driver_bmp390.c.

◆ bmp390_read_pressure()

uint8_t bmp390_read_pressure ( bmp390_handle_t * handle,
uint32_t * raw,
float * pa )

read the pressure

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

Definition at line 3110 of file driver_bmp390.c.

◆ bmp390_read_temperature()

uint8_t bmp390_read_temperature ( bmp390_handle_t * handle,
uint32_t * raw,
float * c )

read the temperature

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

Definition at line 2958 of file driver_bmp390.c.

◆ bmp390_read_temperature_pressure()

uint8_t bmp390_read_temperature_pressure ( bmp390_handle_t * handle,
uint32_t * temperature_raw,
float * temperature_c,
uint32_t * pressure_raw,
float * pressure_pa )

read the temperature and pressure

Parameters
[in]*handlepointer to a bmp390 handle structure
[out]*temperature_rawpointer to a raw temperature buffer
[out]*temperature_cpointer to a converted temperature buffer
[out]*pressure_rawpointer to a raw pressure buffer
[out]*pressure_papointer to a converted pressure buffer
Returns
status code
  • 0 success
  • 1 read temperature pressure failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3312 of file driver_bmp390.c.

◆ bmp390_set_addr_pin()

uint8_t bmp390_set_addr_pin ( bmp390_handle_t * handle,
bmp390_address_t addr_pin )

set the iic address pin

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

Definition at line 3572 of file driver_bmp390.c.

◆ bmp390_set_filter_coefficient()

uint8_t bmp390_set_filter_coefficient ( bmp390_handle_t * handle,
bmp390_filter_coefficient_t coefficient )

set the filter coefficient

Parameters
[in]*handlepointer to a bmp390 handle structure
[in]coefficientfilter coefficient
Returns
status code
  • 0 success
  • 1 set filter coefficient failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2561 of file driver_bmp390.c.

◆ bmp390_set_iic_watchdog_period()

uint8_t bmp390_set_iic_watchdog_period ( bmp390_handle_t * handle,
bmp390_iic_watchdog_period_t period )

set the iic watchdog period

Parameters
[in]*handlepointer to a bmp390 handle structure
[in]periodiic watchdog period
Returns
status code
  • 0 success
  • 1 set iic watchdog period failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1986 of file driver_bmp390.c.

◆ bmp390_set_iic_watchdog_timer()

uint8_t bmp390_set_iic_watchdog_timer ( bmp390_handle_t * handle,
bmp390_bool_t enable )

enable or disable the iic watchdog timer

Parameters
[in]*handlepointer to a bmp390 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set iic watchdog timer failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1904 of file driver_bmp390.c.

◆ bmp390_set_interface()

uint8_t bmp390_set_interface ( bmp390_handle_t * handle,
bmp390_interface_t interface )

set the interface

Parameters
[in]*handlepointer to a bmp390 handle structure
[in]interfacechip interface
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 3614 of file driver_bmp390.c.

◆ bmp390_set_mode()

uint8_t bmp390_set_mode ( bmp390_handle_t * handle,
bmp390_mode_t mode )

set the chip mode

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

Definition at line 2232 of file driver_bmp390.c.

◆ bmp390_set_odr()

uint8_t bmp390_set_odr ( bmp390_handle_t * handle,
bmp390_odr_t odr )

set the output data rate

Parameters
[in]*handlepointer to a bmp390 handle structure
[in]odroutput data rate
Returns
status code
  • 0 success
  • 1 set odr failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2478 of file driver_bmp390.c.

◆ bmp390_set_pressure()

uint8_t bmp390_set_pressure ( bmp390_handle_t * handle,
bmp390_bool_t enable )

enable or disable the pressure

Parameters
[in]*handlepointer to a bmp390 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set pressure failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2068 of file driver_bmp390.c.

◆ bmp390_set_pressure_oversampling()

uint8_t bmp390_set_pressure_oversampling ( bmp390_handle_t * handle,
bmp390_oversampling_t oversampling )

set the pressure oversampling

Parameters
[in]*handlepointer to a bmp390 handle structure
[in]oversamplingpressure oversampling
Returns
status code
  • 0 success
  • 1 set pressure oversampling failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2314 of file driver_bmp390.c.

◆ bmp390_set_spi_wire()

uint8_t bmp390_set_spi_wire ( bmp390_handle_t * handle,
bmp390_spi_wire_t wire )

set the spi wire

Parameters
[in]*handlepointer to a bmp390 handle structure
[in]wirespi wire
Returns
status code
  • 0 success
  • 1 set spi wire failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1822 of file driver_bmp390.c.

◆ bmp390_set_temperature()

uint8_t bmp390_set_temperature ( bmp390_handle_t * handle,
bmp390_bool_t enable )

enable or disable the temperature

Parameters
[in]*handlepointer to a bmp390 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set temperature failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2150 of file driver_bmp390.c.

◆ bmp390_set_temperature_oversampling()

uint8_t bmp390_set_temperature_oversampling ( bmp390_handle_t * handle,
bmp390_oversampling_t oversampling )

set the temperature oversampling

Parameters
[in]*handlepointer to a bmp390 handle structure
[in]oversamplingtemperature oversampling
Returns
status code
  • 0 success
  • 1 set temperature oversampling failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2396 of file driver_bmp390.c.

◆ bmp390_softreset()

uint8_t bmp390_softreset ( bmp390_handle_t * handle)

soft reset

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

Definition at line 2679 of file driver_bmp390.c.