2 * Copyright (C) 2016 - 2017 Bosch Sensortec GmbH
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
7 * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * Neither the name of the copyright holder nor the names of the
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
19 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
20 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 * DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
23 * OR CONTRIBUTORS BE LIABLE FOR ANY
24 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
25 * OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 * ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
34 * The information provided is believed to be accurate and reliable.
35 * The copyright holder assumes no responsibility
36 * for the consequences of use
37 * of such information nor for any infringement of patents or
38 * other rights of third parties which may result from its use.
39 * No license is granted by implication or otherwise under any patent or
40 * patent rights of the copyright holder.
42 * File bme280_selftest.h
49 * @addtogroup bme280_selftest
53 #ifndef BME280_SELFTEST_H_
54 #define BME280_SELFTEST_H_
64 /**\name API warning code */
65 #define BME280_W_SELF_TEST_FAIL INT8_C(2)
68 * @brief This API reads the stored CRC and then compare with calculated CRC
70 * @param[in] dev : Structure instance of bme280_dev.
72 * @return Result of API execution status
73 * @retval zero -> Success / +ve value -> Warning / -ve value -> Error
75 int8_t bme280_crc_selftest(const struct bme280_dev *dev);
83 #endif /* BME280_SELFTEST_H_ */