ESP32-PaxCounter/include/bme680mems.h

32 lines
818 B
C
Raw Normal View History

2018-11-22 23:37:53 +01:00
#ifndef _BME680MEMS_H
#define _BME680MEMS_H
#include "globals.h"
#include <Wire.h>
2018-11-25 11:48:03 +01:00
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "bsec_integration.h"
#include "bsec_integration.c"
2018-11-22 23:37:53 +01:00
extern bmeStatus_t
bme_status; // Make struct for storing gps data globally available
2018-11-25 11:48:03 +01:00
int bme_init();
2018-11-22 23:37:53 +01:00
bool bme_read();
void user_delay_ms(uint32_t period);
2018-11-25 11:48:03 +01:00
int64_t get_timestamp_us();
2018-11-22 23:37:53 +01:00
int8_t user_i2c_read(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data,
uint16_t len);
int8_t user_i2c_write(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data,
uint16_t len);
2018-11-25 11:48:03 +01:00
uint32_t state_load(uint8_t *state_buffer, uint32_t n_buffer);
void state_save(const uint8_t *state_buffer, uint32_t length);
uint32_t config_load(uint8_t *config_buffer, uint32_t n_buffer);
2018-11-22 23:37:53 +01:00
#endif