資源簡介
本驅動代碼,適用于集合溫度測量,濕度測量,以及大氣壓強測量于一體的bme280模塊。親測穩定有效。IIC

代碼片段和文件信息
/**\mainpage
?*?Copyright?(C)?2016?-?2017?Bosch?Sensortec?GmbH
?*
?*?Redistribution?and?use?in?source?and?binary?forms?with?or?without
?*?modification?are?permitted?provided?that?the?following?conditions?are?met:
?*
?*?Redistributions?of?source?code?must?retain?the?above?copyright
?*?notice?this?list?of?conditions?and?the?following?disclaimer.
?*
?*?Redistributions?in?binary?form?must?reproduce?the?above?copyright
?*?notice?this?list?of?conditions?and?the?following?disclaimer?in?the
?*?documentation?and/or?other?materials?provided?with?the?distribution.
?*
?*?Neither?the?name?of?the?copyright?holder?nor?the?names?of?the
?*?contributors?may?be?used?to?endorse?or?promote?products?derived?from
?*?this?software?without?specific?prior?written?permission.
?*
?*?THIS?SOFTWARE?IS?PROVIDED?BY?THE?COPYRIGHT?HOLDERS?AND
?*?CONTRIBUTORS?“AS?IS“?AND?ANY?EXPRESS?OR
?*?IMPLIED?WARRANTIES?INCLUDING?BUT?NOT?LIMITED?TO?THE?IMPLIED
?*?WARRANTIES?OF?MERCHANTABILITY?AND?FITNESS?FOR?A?PARTICULAR?PURPOSE?ARE
?*?DISCLAIMED.?IN?NO?EVENT?SHALL?COPYRIGHT?HOLDER
?*?OR?CONTRIBUTORS?BE?LIABLE?FOR?ANY
?*?DIRECT?INDIRECT?INCIDENTAL?SPECIAL?EXEMPLARY
?*?OR?CONSEQUENTIAL?DAMAGES(INCLUDING?BUT?NOT?LIMITED?TO
?*?PROCUREMENT?OF?SUBSTITUTE?GOODS?OR?SERVICES;
?*?LOSS?OF?USE?DATA?OR?PROFITS;?OR?BUSINESS?INTERRUPTION)
?*?HOWEVER?CAUSED?AND?ON?ANY?THEORY?OF?LIABILITY
?*?WHETHER?IN?CONTRACT?STRICT?LIABILITY?OR?TORT
?*?(INCLUDING?NEGLIGENCE?OR?OTHERWISE)?ARISING?IN
?*?ANY?WAY?OUT?OF?THE?USE?OF?THIS
?*?SOFTWARE?EVEN?IF?ADVISED?OF?THE?POSSIBILITY?OF?SUCH?DAMAGE
?*
?*?The?information?provided?is?believed?to?be?accurate?and?reliable.
?*?The?copyright?holder?assumes?no?responsibility
?*?for?the?consequences?of?use
?*?of?such?information?nor?for?any?infringement?of?patents?or
?*?other?rights?of?third?parties?which?may?result?from?its?use.
?*?No?license?is?granted?by?implication?or?otherwise?under?any?patent?or
?*?patent?rights?of?the?copyright?holder.
?*
?*?File bme280.c
?*?Date 22?Nov?2017
?*?Version 3.3.2
?*
?*/
/*!?@file?bme280.c
????@brief?Sensor?driver?for?BME280?sensor?*/
#include?“bme280.h“
#include?“stm32f4xx.h“
#include?
#include?
#include?
#include?
#include??
#include?“stm32f4xx_i2c.h“??
#include?“myiic.h“
#include?“bme_thread.h“
/**\name?Internal?macros?*/
/*?To?identify?osr?settings?selected?by?user?*/
#define?OVERSAMPLING_SETTINGS UINT8_C(0x07)
/*?To?identify?filter?and?standby?settings?selected?by?user?*/
#define?FILTER_STANDBY_SETTINGS UINT8_C(0x18)
EnvSensorValue???g_EnvSensor;?
/*!
?*?@brief?This?internal?API?puts?the?device?to?sleep?mode.
?*
?*?@param[in]?dev?:?Structure?instance?of?bme280_dev.
?*
?*?@return?Result?of?API?execution?status.
?*?@retval?zero?->?Success?/?+ve?value?->?Warning?/?-ve?value?->?Error
?*/
static?int8_t?put_device_to_sleep(const?struct?bme280_dev?*dev);
/*!
?*?@brief?This?internal?API?writes?the?power?m
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????1960??2018-05-25?13:42??bitband.h
?????文件???????46200??2018-05-25?13:42??bme280.c
?????文件????????9240??2018-05-25?13:42??bme280.h
?????文件???????10570??2018-05-25?13:42??bme280_defs.h
?????文件????????4971??2018-05-25?13:42??bme280_selftest.c
?????文件????????2791??2018-05-25?13:42??bme280_selftest.h
?????文件????????3822??2018-05-25?13:42??bme_thread.c
?????文件????????1004??2018-05-25?13:42??bme_thread.h
- 上一篇:讀取雷達SA數據
- 下一篇:STM32f407 SDcard
評論
共有 條評論