INSAT Mini Project
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Fork of X_NUCLEO_6180XA1 by
Components/VL6180X/vl6180x_appcfg.h@1:1de1ea2994d9, 2015-09-09 (annotated)
- Committer:
- gallonm
- Date:
- Wed Sep 09 16:00:39 2015 +0000
- Revision:
- 1:1de1ea2994d9
- Child:
- 7:2dc81120c917
Added some files
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gallonm | 1:1de1ea2994d9 | 1 | |
gallonm | 1:1de1ea2994d9 | 2 | /******************************************************************************* |
gallonm | 1:1de1ea2994d9 | 3 | Copyright © 2014, STMicroelectronics International N.V. |
gallonm | 1:1de1ea2994d9 | 4 | All rights reserved. |
gallonm | 1:1de1ea2994d9 | 5 | |
gallonm | 1:1de1ea2994d9 | 6 | Redistribution and use in source and binary forms, with or without |
gallonm | 1:1de1ea2994d9 | 7 | modification, are permitted provided that the following conditions are met: |
gallonm | 1:1de1ea2994d9 | 8 | * Redistributions of source code must retain the above copyright |
gallonm | 1:1de1ea2994d9 | 9 | notice, this list of conditions and the following disclaimer. |
gallonm | 1:1de1ea2994d9 | 10 | * Redistributions in binary form must reproduce the above copyright |
gallonm | 1:1de1ea2994d9 | 11 | notice, this list of conditions and the following disclaimer in the |
gallonm | 1:1de1ea2994d9 | 12 | documentation and/or other materials provided with the distribution. |
gallonm | 1:1de1ea2994d9 | 13 | * Neither the name of STMicroelectronics nor the |
gallonm | 1:1de1ea2994d9 | 14 | names of its contributors may be used to endorse or promote products |
gallonm | 1:1de1ea2994d9 | 15 | derived from this software without specific prior written permission. |
gallonm | 1:1de1ea2994d9 | 16 | |
gallonm | 1:1de1ea2994d9 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
gallonm | 1:1de1ea2994d9 | 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
gallonm | 1:1de1ea2994d9 | 19 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND |
gallonm | 1:1de1ea2994d9 | 20 | NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS ARE DISCLAIMED. |
gallonm | 1:1de1ea2994d9 | 21 | IN NO EVENT SHALL STMICROELECTRONICS INTERNATIONAL N.V. BE LIABLE FOR ANY |
gallonm | 1:1de1ea2994d9 | 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
gallonm | 1:1de1ea2994d9 | 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
gallonm | 1:1de1ea2994d9 | 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
gallonm | 1:1de1ea2994d9 | 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
gallonm | 1:1de1ea2994d9 | 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
gallonm | 1:1de1ea2994d9 | 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
gallonm | 1:1de1ea2994d9 | 28 | ********************************************************************************/ |
gallonm | 1:1de1ea2994d9 | 29 | |
gallonm | 1:1de1ea2994d9 | 30 | |
gallonm | 1:1de1ea2994d9 | 31 | /* |
gallonm | 1:1de1ea2994d9 | 32 | * vl6180x_appcfg.h |
gallonm | 1:1de1ea2994d9 | 33 | * |
gallonm | 1:1de1ea2994d9 | 34 | */ |
gallonm | 1:1de1ea2994d9 | 35 | |
gallonm | 1:1de1ea2994d9 | 36 | #ifndef VL6180X_APPCFG_H_ |
gallonm | 1:1de1ea2994d9 | 37 | #define VL6180X_APPCFG_H_ |
gallonm | 1:1de1ea2994d9 | 38 | |
gallonm | 1:1de1ea2994d9 | 39 | |
gallonm | 1:1de1ea2994d9 | 40 | /** |
gallonm | 1:1de1ea2994d9 | 41 | * @def VL6180x_SINGLE_DEVICE_DRIVER |
gallonm | 1:1de1ea2994d9 | 42 | * @brief enable lightweight single vl6180x device driver |
gallonm | 1:1de1ea2994d9 | 43 | * |
gallonm | 1:1de1ea2994d9 | 44 | * value 1 => single device capable |
gallonm | 1:1de1ea2994d9 | 45 | * Configure optimized APi for single device driver with static data and minimal use of ref pointer \n |
gallonm | 1:1de1ea2994d9 | 46 | * limited to single device driver or application in non multi thread/core environment \n |
gallonm | 1:1de1ea2994d9 | 47 | * |
gallonm | 1:1de1ea2994d9 | 48 | * value 0 => multiple device capable user must review "device" structure and type in porting files |
gallonm | 1:1de1ea2994d9 | 49 | * @ingroup Configuration |
gallonm | 1:1de1ea2994d9 | 50 | */ |
gallonm | 1:1de1ea2994d9 | 51 | #define VL6180x_SINGLE_DEVICE_DRIVER 1 |
gallonm | 1:1de1ea2994d9 | 52 | |
gallonm | 1:1de1ea2994d9 | 53 | |
gallonm | 1:1de1ea2994d9 | 54 | /** |
gallonm | 1:1de1ea2994d9 | 55 | * @def VL6180x_RANGE_STATUS_ERRSTRING |
gallonm | 1:1de1ea2994d9 | 56 | * @brief when define include range status Error string and related |
gallonm | 1:1de1ea2994d9 | 57 | * |
gallonm | 1:1de1ea2994d9 | 58 | * The string table lookup require some space in read only area |
gallonm | 1:1de1ea2994d9 | 59 | * @ingroup Configuration |
gallonm | 1:1de1ea2994d9 | 60 | */ |
gallonm | 1:1de1ea2994d9 | 61 | #define VL6180x_RANGE_STATUS_ERRSTRING 1 |
gallonm | 1:1de1ea2994d9 | 62 | |
gallonm | 1:1de1ea2994d9 | 63 | /** |
gallonm | 1:1de1ea2994d9 | 64 | * @def VL6180X_SAFE_POLLING_ENTER |
gallonm | 1:1de1ea2994d9 | 65 | * |
gallonm | 1:1de1ea2994d9 | 66 | * @brief Ensure safe polling method when set |
gallonm | 1:1de1ea2994d9 | 67 | * |
gallonm | 1:1de1ea2994d9 | 68 | * Polling for a condition can be hazardous and result in infinite looping if any previous interrupt status |
gallonm | 1:1de1ea2994d9 | 69 | * condition is not cleared. \n |
gallonm | 1:1de1ea2994d9 | 70 | * Setting these flags enforce error clearing on start of polling method to avoid it. |
gallonm | 1:1de1ea2994d9 | 71 | * the drawback are : \n |
gallonm | 1:1de1ea2994d9 | 72 | * @li extra use-less i2c bus usage and traffic |
gallonm | 1:1de1ea2994d9 | 73 | * @li potentially slower measure rate. |
gallonm | 1:1de1ea2994d9 | 74 | * If application ensure interrupt get clear on mode or interrupt configuration change |
gallonm | 1:1de1ea2994d9 | 75 | * then keep option disabled. \n |
gallonm | 1:1de1ea2994d9 | 76 | * To be safe set these option to 1 |
gallonm | 1:1de1ea2994d9 | 77 | * @ingroup Configuration |
gallonm | 1:1de1ea2994d9 | 78 | */ |
gallonm | 1:1de1ea2994d9 | 79 | #define VL6180X_SAFE_POLLING_ENTER 0 |
gallonm | 1:1de1ea2994d9 | 80 | |
gallonm | 1:1de1ea2994d9 | 81 | |
gallonm | 1:1de1ea2994d9 | 82 | /** |
gallonm | 1:1de1ea2994d9 | 83 | * @brief Enable function start/end logging |
gallonm | 1:1de1ea2994d9 | 84 | * |
gallonm | 1:1de1ea2994d9 | 85 | * requires porting @a #LOG_FUNCTION_START @a #LOG_FUNCTION_END @a #LOG_FUNCTION_END_FMT |
gallonm | 1:1de1ea2994d9 | 86 | * @ingroup Configuration |
gallonm | 1:1de1ea2994d9 | 87 | */ |
gallonm | 1:1de1ea2994d9 | 88 | #define VL6180X_LOG_ENABLE 0 |
gallonm | 1:1de1ea2994d9 | 89 | |
gallonm | 1:1de1ea2994d9 | 90 | |
gallonm | 1:1de1ea2994d9 | 91 | |
gallonm | 1:1de1ea2994d9 | 92 | #endif /* VL6180X_APPCFG_H_ */ |