Bmp280 Driver TivaC
Driver for weather sensor BMP280 for TivaC MCU
|
Utils files contain helper functions for BMP280_Drv.c files as well as the glues to work with I2C and SPI specific stuffs. More...
#include "include/BMP280_Utils.h"
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
#include "include/BMP280_Drv.h"
#include "include/TivaC_I2C.h"
#include "include/TivaC_SPI.h"
Functions | |
Bmp280ErrCode | bmp280_check_setting (bmp280 *sensor) |
check user settings to make sure they are among the supported options | |
Bmp280ErrCode | bmp280_port_check (bmp280 *sensor) |
port check that are run before data communication | |
Bmp280ErrCode | bmp280_make_ctrl_byte (bmp280 *sensor, uint8_t *controlByte) |
create a byte corresponding to user option to be sent to the control register on the BMP280 | |
uint8_t | bmp280_make_cfg_byte (bmp280 *sensor, uint8_t *returnByte) |
create a byte corresponding to user option to be sent to the config register on the BMP280 | |
Bmp280ErrCode | bmp280_open_i2c_spi (bmp280 *sensor) |
open spi or i2c communications | |
Bmp280ErrCode | bmp280_close_i2c_spi (bmp280 *sensor) |
close i2c or spi communications | |
Bmp280ErrCode | bmp280_port_prep (bmp280 *sensor) |
things to run to prep the i2c/spi port for communication | |
Bmp280ErrCode | bmp280_get_register (bmp280 *sensor, const uint8_t startAddr, uint8_t *regData, const uint8_t totalRegister) |
protocol agnostic function to get data from one or multiple register | |
Bmp280ErrCode | bmp280_write_register (bmp280 *sensor, const uint8_t *registerList, const uint8_t totalRegister, const uint8_t *registerDataList) |
protocol agnostic function to write data to one or multiple register | |
Utils files contain helper functions for BMP280_Drv.c files as well as the glues to work with I2C and SPI specific stuffs.