vl6180x_appcfg.h 3.4 KB

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