1 /* vl53l1x_platform_user_defines.h - Zephyr customization of ST vl53l1x library. */ 2 3 /* 4 * Copyright (c) 2017 STMicroelectronics 5 * 6 * SPDX-License-Identifier: Apache-2.0 7 */ 8 9 #ifndef _VL53L1_PLATFORM_USER_DEFINES_H_ 10 #define _VL53L1_PLATFORM_USER_DEFINES_H_ 11 12 #ifdef __cplusplus 13 extern "C" 14 { 15 #endif 16 17 /** 18 * @file vl53l1_platform_user_defines.h 19 * 20 * @brief All end user OS/platform/application definitions 21 */ 22 23 24 /** 25 * @def do_division_u 26 * @brief customer supplied division operation - 64-bit unsigned 27 * 28 * @param dividend unsigned 64-bit numerator 29 * @param divisor unsigned 64-bit denominator 30 */ 31 #define do_division_u(dividend, divisor) (dividend / divisor) 32 33 34 /** 35 * @def do_division_s 36 * @brief customer supplied division operation - 64-bit signed 37 * 38 * @param dividend signed 64-bit numerator 39 * @param divisor signed 64-bit denominator 40 */ 41 #define do_division_s(dividend, divisor) (dividend / divisor) 42 43 44 /** 45 * @def WARN_OVERRIDE_STATUS 46 * @brief customer supplied macro to optionally output info when a specific 47 error has been overridden with success within the EwokPlus driver 48 * 49 * @param __X__ the macro which enabled the suppression 50 */ 51 #define WARN_OVERRIDE_STATUS(__X__)\ 52 trace_print(VL53L1_TRACE_LEVEL_WARNING, #__X__); 53 54 55 #ifdef _MSC_VER 56 #define DISABLE_WARNINGS() { \ 57 __pragma(warning(push)); \ 58 __pragma(warning(disable:4127)); \ 59 } 60 #define ENABLE_WARNINGS() { \ 61 __pragma(warning(pop)); \ 62 } 63 #else 64 #define DISABLE_WARNINGS() 65 #define ENABLE_WARNINGS() 66 #endif 67 68 69 #ifdef __cplusplus 70 } 71 #endif 72 73 #endif 74