]> git.itanic.dy.fi Git - BME280_driver/blob - selftest/bme280_selftest.h
adb6d1ce3a9824ba6e927de5f61c17190fe22c5a
[BME280_driver] / selftest / bme280_selftest.h
1 /**\r
2 * Copyright (c) 2020 Bosch Sensortec GmbH. All rights reserved.\r
3 *\r
4 * BSD-3-Clause\r
5 *\r
6 * Redistribution and use in source and binary forms, with or without\r
7 * modification, are permitted provided that the following conditions are met:\r
8 *\r
9 * 1. Redistributions of source code must retain the above copyright\r
10 *    notice, this list of conditions and the following disclaimer.\r
11 *\r
12 * 2. Redistributions in binary form must reproduce the above copyright\r
13 *    notice, this list of conditions and the following disclaimer in the\r
14 *    documentation and/or other materials provided with the distribution.\r
15 *\r
16 * 3. Neither the name of the copyright holder nor the names of its\r
17 *    contributors may be used to endorse or promote products derived from\r
18 *    this software without specific prior written permission.\r
19 *\r
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\r
23 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\r
24 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\r
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\r
27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\r
29 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
30 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
31 * POSSIBILITY OF SUCH DAMAGE.\r
32 *\r
33 * @file bme280_selftest.h\r
34 * @date 21/01/2020\r
35 * @version  3.4.2\r
36 *\r
37 */\r
38 \r
39 /*!\r
40  * @addtogroup bme280_selftest\r
41  * @brief\r
42  */\r
43 \r
44 #ifndef BME280_SELFTEST_H_\r
45 #define BME280_SELFTEST_H_\r
46 \r
47 #include "bme280.h"\r
48 \r
49 /*! CPP guard */\r
50 #ifdef __cplusplus\r
51 extern "C" {\r
52 #endif\r
53 \r
54 /**\name API warning code */\r
55 #define BME280_W_SELF_TEST_FAIL INT8_C(2)\r
56 \r
57 /*!\r
58  * @brief This API reads the stored CRC and then compare with calculated CRC\r
59  *\r
60  * @param[in] dev : Structure instance of bme280_dev.\r
61  *\r
62  * @return Result of API execution status\r
63  * @retval zero -> Success / +ve value -> Warning / -ve value -> Error\r
64  */\r
65 int8_t bme280_selftest_crc(const struct bme280_dev *dev);\r
66 \r
67 /*! CPP guard */\r
68 #ifdef __cplusplus\r
69 }\r
70 #endif\r
71 \r
72 #endif /* BME280_SELFTEST_H_ */\r
73 /** @}*/\r