ST Expansion SW Team / VL53L1

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   X_NUCLEO_53L1CB

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers vl53l1_platform_user_defines.h Source File

vl53l1_platform_user_defines.h

00001 
00002 /*******************************************************************************
00003  This file is part of VL53L1 Platform
00004 
00005  Copyright (c) 2020, STMicroelectronics - All Rights Reserved
00006 
00007  License terms: BSD 3-clause "New" or "Revised" License.
00008 
00009  Redistribution and use in source and binary forms, with or without
00010  modification, are permitted provided that the following conditions are met:
00011 
00012  1. Redistributions of source code must retain the above copyright notice, this
00013  list of conditions and the following disclaimer.
00014 
00015  2. Redistributions in binary form must reproduce the above copyright notice,
00016  this list of conditions and the following disclaimer in the documentation
00017  and/or other materials provided with the distribution.
00018 
00019  3. Neither the name of the copyright holder nor the names of its contributors
00020  may be used to endorse or promote products derived from this software
00021  without specific prior written permission.
00022 
00023  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00024  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00025  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00026  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
00027  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00028  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00029  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00030  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00031  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00032  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00033 
00034 */
00035 
00036 
00037 
00038 #ifndef _VL53L1_PLATFORM_USER_DEFINES_H_
00039 #define _VL53L1_PLATFORM_USER_DEFINES_H_
00040 
00041 #ifdef __cplusplus
00042 extern "C"
00043 {
00044 #endif
00045 
00046 
00047 
00048 
00049 
00050 #define do_division_u(dividend, divisor) (dividend / divisor)
00051 
00052 
00053 
00054 #define do_division_s(dividend, divisor) (dividend / divisor)
00055 
00056 
00057 
00058 #define WARN_OVERRIDE_STATUS(__X__)\
00059     trace_print (VL53L1_TRACE_LEVEL_WARNING, #__X__);
00060 
00061 
00062 #ifdef _MSC_VER
00063 #define DISABLE_WARNINGS() { \
00064     __pragma (warning (push)); \
00065     __pragma (warning (disable:4127)); \
00066     }
00067 #define ENABLE_WARNINGS() { \
00068     __pragma (warning (pop)); \
00069     }
00070 #else
00071     #define DISABLE_WARNINGS()
00072     #define ENABLE_WARNINGS()
00073 #endif
00074 
00075 
00076 #ifdef __cplusplus
00077 }
00078 #endif
00079 
00080 #endif
00081 
00082 
00083