Data Logger BLE Cellular Board
Loading...
Searching...
No Matches
common.h File Reference
#include "bme68x.h"

Go to the source code of this file.

Functions

int8_t bme68x_interface_init (struct bme68x_dev *bme, uint8_t intf)
 Function to select the interface between SPI and I2C.
 
BME68X_INTF_RET_TYPE bme68x_i2c_read (uint8_t reg_addr, uint8_t *reg_data, uint32_t len, void *intf_ptr)
 Function for reading the sensor's registers through I2C bus.
 
BME68X_INTF_RET_TYPE bme68x_i2c_write (uint8_t reg_addr, const uint8_t *reg_data, uint32_t len, void *intf_ptr)
 Function for writing the sensor's registers through I2C bus.
 
BME68X_INTF_RET_TYPE bme68x_spi_read (uint8_t reg_addr, uint8_t *reg_data, uint32_t len, void *intf_ptr)
 Function for reading the sensor's registers through SPI bus.
 
BME68X_INTF_RET_TYPE bme68x_spi_write (uint8_t reg_addr, const uint8_t *reg_data, uint32_t len, void *intf_ptr)
 Function for writing the sensor's registers through SPI bus.
 
void bme68x_delay_us (uint32_t period, void *intf_ptr)
 This function provides the delay for required time (Microsecond) as per the input provided in some of the APIs.
 
void bme68x_check_rslt (const char api_name[], int8_t rslt)
 Log BME68X API result and error details.
 
void bme68x_coines_deinit (void)
 Deinitializes coines platform.
 

Function Documentation

◆ bme68x_check_rslt()

void bme68x_check_rslt ( const char api_name[],
int8_t rslt )

Log BME68X API result and error details.

Parameters
api_nameName of the called BME68X API.
rsltResult code returned by the BME68X function.

Definition at line 361 of file common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bme68x_coines_deinit()

void bme68x_coines_deinit ( void )

Deinitializes coines platform.

◆ bme68x_delay_us()

void bme68x_delay_us ( uint32_t period,
void * intf_ptr )

This function provides the delay for required time (Microsecond) as per the input provided in some of the APIs.

Parameters
[in]period: The required wait time in microsecond.
[in]intf_ptr: Interface pointer

Definition at line 347 of file common.c.

Here is the caller graph for this function:

◆ bme68x_i2c_read()

BME68X_INTF_RET_TYPE bme68x_i2c_read ( uint8_t reg_addr,
uint8_t * reg_data,
uint32_t len,
void * intf_ptr )

Function for reading the sensor's registers through I2C bus.

Parameters
[in]reg_addr: Register address.
[out]reg_data: Pointer to the data buffer to store the read data.
[in]len: No of bytes to read.
[in]intf_ptr: Interface pointer
Returns
Status of execution
Return values
=BME68X_INTF_RET_SUCCESS -> Success
!=BME68X_INTF_RET_SUCCESS -> Failure Info

Definition at line 228 of file common.c.

Here is the caller graph for this function:

◆ bme68x_i2c_write()

BME68X_INTF_RET_TYPE bme68x_i2c_write ( uint8_t reg_addr,
const uint8_t * reg_data,
uint32_t len,
void * intf_ptr )

Function for writing the sensor's registers through I2C bus.

Parameters
[in]reg_addr: Register address.
[in]reg_data: Pointer to the data buffer whose value is to be written.
[in]len: No of bytes to write.
[in]intf_ptr: Interface pointer
Returns
Status of execution
Return values
=BME68X_INTF_RET_SUCCESS -> Success
!=BME68X_INTF_RET_SUCCESS -> Failure Info

Definition at line 250 of file common.c.

Here is the caller graph for this function:

◆ bme68x_interface_init()

int8_t bme68x_interface_init ( struct bme68x_dev * bme,
uint8_t intf )

Function to select the interface between SPI and I2C.

Copyright (C) 2023 Bosch Sensortec GmbH. All rights reserved.

SPDX-License-Identifier: BSD-3-Clause

Parameters
[in]bme: Structure instance of bme68x_dev
[in]intf: Interface selection parameter
Returns
Status of execution
Return values
0-> Success
<0 -> Failure Info

Definition at line 401 of file common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bme68x_spi_read()

BME68X_INTF_RET_TYPE bme68x_spi_read ( uint8_t reg_addr,
uint8_t * reg_data,
uint32_t len,
void * intf_ptr )

Function for reading the sensor's registers through SPI bus.

Parameters
[in]reg_addr: Register address.
[out]reg_data: Pointer to the data buffer to store the read data.
[in]len: No of bytes to read.
[in]intf_ptr: Interface pointer
Returns
Status of execution
Return values
=BME68X_INTF_RET_SUCCESS -> Success
!=BME68X_INTF_RET_SUCCESS -> Failure Info

Definition at line 271 of file common.c.

Here is the caller graph for this function:

◆ bme68x_spi_write()

BME68X_INTF_RET_TYPE bme68x_spi_write ( uint8_t reg_addr,
const uint8_t * reg_data,
uint32_t len,
void * intf_ptr )

Function for writing the sensor's registers through SPI bus.

Parameters
[in]reg_addr: Register address.
[in]reg_data: Pointer to the data buffer whose data has to be written.
[in]len: No of bytes to write.
[in]intf_ptr: Interface pointer
Returns
Status of execution
Return values
=BME68X_INTF_RET_SUCCESS -> Success
!=BME68X_INTF_RET_SUCCESS -> Failure Info

Definition at line 318 of file common.c.

Here is the caller graph for this function: