prova

Dependencies:   X_NUCLEO_53L0A1 mbed

Fork of 53L0A1_HandGestureRecognition by ST

Committer:
mapellil
Date:
Thu Feb 22 15:50:29 2018 +0000
Revision:
9:6205ef056c8a
Parent:
7:d79cbeda2982
AStDay

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mapellil 7:d79cbeda2982 1 /*******************************************************************************
mapellil 7:d79cbeda2982 2 Copyright � 2015, STMicroelectronics International N.V.
mapellil 7:d79cbeda2982 3 All rights reserved.
mapellil 7:d79cbeda2982 4
mapellil 7:d79cbeda2982 5 Use and Redistribution are permitted only in accordance with licensing terms
mapellil 7:d79cbeda2982 6 available at www.st.com under software reference X-CUBE-6180XA1, and provided
mapellil 7:d79cbeda2982 7 that the following conditions are met:
mapellil 7:d79cbeda2982 8 * Redistributions of source code must retain the above copyright
mapellil 7:d79cbeda2982 9 notice, this list of conditions and the following disclaimer.
mapellil 7:d79cbeda2982 10 * Redistributions in binary form must reproduce the above copyright
mapellil 7:d79cbeda2982 11 notice, this list of conditions and the following disclaimer in the
mapellil 7:d79cbeda2982 12 documentation and/or other materials provided with the distribution.
mapellil 7:d79cbeda2982 13 * Neither the name of STMicroelectronics nor the
mapellil 7:d79cbeda2982 14 names of its contributors may be used to endorse or promote products
mapellil 7:d79cbeda2982 15 derived from this software without specific prior written permission.
mapellil 7:d79cbeda2982 16
mapellil 7:d79cbeda2982 17 THIS SOFTWARE IS PROTECTED BY STMICROELECTRONICS PATENTS AND COPYRIGHTS.
mapellil 7:d79cbeda2982 18 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
mapellil 7:d79cbeda2982 19 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
mapellil 7:d79cbeda2982 20 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
mapellil 7:d79cbeda2982 21 NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS ARE DISCLAIMED.
mapellil 7:d79cbeda2982 22 IN NO EVENT SHALL STMICROELECTRONICS INTERNATIONAL N.V. BE LIABLE FOR ANY
mapellil 7:d79cbeda2982 23 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
mapellil 7:d79cbeda2982 24 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
mapellil 7:d79cbeda2982 25 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
mapellil 7:d79cbeda2982 26 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
mapellil 7:d79cbeda2982 27 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
mapellil 7:d79cbeda2982 28 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mapellil 7:d79cbeda2982 29 ********************************************************************************/
mapellil 7:d79cbeda2982 30
mapellil 7:d79cbeda2982 31 /*
mapellil 7:d79cbeda2982 32 * @file tof_gestures_platform.h
mapellil 7:d79cbeda2982 33 * $Date: 2015-11-10 11:21:53 +0100 (Tue, 10 Nov 2015) $
mapellil 7:d79cbeda2982 34 * $Revision: 2612 $
mapellil 7:d79cbeda2982 35 */
mapellil 7:d79cbeda2982 36
mapellil 7:d79cbeda2982 37 #ifndef TOF_GESTURES_PLATFORM_H_
mapellil 7:d79cbeda2982 38 #define TOF_GESTURES_PLATFORM_H_
mapellil 7:d79cbeda2982 39
mapellil 7:d79cbeda2982 40 #include "tof_gestures_types.h"
mapellil 7:d79cbeda2982 41 //#include "stm32xxx_hal.h"
mapellil 7:d79cbeda2982 42
mapellil 7:d79cbeda2982 43 /**
mapellil 7:d79cbeda2982 44 * @def GET_TIME_STAMP
mapellil 7:d79cbeda2982 45 * @brief Return a timestamp in ms (platform-dependent)
mapellil 7:d79cbeda2982 46 */
mapellil 7:d79cbeda2982 47 #define GET_TIME_STAMP() (int32_t)HAL_GetTick()
mapellil 7:d79cbeda2982 48
mapellil 7:d79cbeda2982 49 #define ROMABLE_DATA
mapellil 7:d79cbeda2982 50 typedef float float_t;
mapellil 7:d79cbeda2982 51
mapellil 7:d79cbeda2982 52
mapellil 7:d79cbeda2982 53 enum gestures_modules_mask{
mapellil 7:d79cbeda2982 54 NONE = 0x0000,
mapellil 7:d79cbeda2982 55 LC_1 = 0x0001,
mapellil 7:d79cbeda2982 56 TAP_SWIPE_1 = 0x0002,
mapellil 7:d79cbeda2982 57 DIRSWIPE_1 = 0x0004,
mapellil 7:d79cbeda2982 58 MOTION = 0x0008,
mapellil 7:d79cbeda2982 59 COVERAGE = 0x0010,
mapellil 7:d79cbeda2982 60 LC_TAP_SWIPE_1 = 0x0020,
mapellil 7:d79cbeda2982 61 TAP_SWIPE_2 = 0x0040,
mapellil 7:d79cbeda2982 62 TAP_1 = 0x0080,
mapellil 7:d79cbeda2982 63 SWIPE_1 = 0x0100,
mapellil 7:d79cbeda2982 64 TAPS_1 = 0x0200,
mapellil 7:d79cbeda2982 65 DIRSWIPE_TAPS_1 = 0x0400,
mapellil 7:d79cbeda2982 66 };
mapellil 7:d79cbeda2982 67
mapellil 7:d79cbeda2982 68
mapellil 7:d79cbeda2982 69 #if defined(TRACE)
mapellil 7:d79cbeda2982 70 #include "diag/Trace.h"
mapellil 7:d79cbeda2982 71 extern uint32_t tof_gestures_enableDebugModuleMask;
mapellil 7:d79cbeda2982 72 #define TOF_GESTURES_DEBUG_SET_MODULES(gestures_modules_mask) tof_gestures_enableDebugModuleMask = gestures_modules_mask
mapellil 7:d79cbeda2982 73 /**
mapellil 7:d79cbeda2982 74 * @def TOF_GESTURES_DEBUG
mapellil 7:d79cbeda2982 75 * @brief Tracing function for debug purpose
mapellil 7:d79cbeda2982 76 *
mapellil 7:d79cbeda2982 77 * Defining TRACE in compiler command line will enable tracing feature (through #TOF_GESTURES_DEBUG macro) for debug purpose.
mapellil 7:d79cbeda2982 78 * This allows to print any formatted text in STM32 ST-Link utility (printf via SWO viewer).
mapellil 7:d79cbeda2982 79 */
mapellil 7:d79cbeda2982 80 #define TOF_GESTURES_DEBUG(gestures_modules_mask,fmt, ... ) \
mapellil 7:d79cbeda2982 81 if(tof_gestures_enableDebugModuleMask & gestures_modules_mask) \
mapellil 7:d79cbeda2982 82 trace_printf("TOF_GESTURES %s @%d\t" fmt "\n", __func__, GET_TIME_STAMP(), ##__VA_ARGS__);\
mapellil 7:d79cbeda2982 83 else\
mapellil 7:d79cbeda2982 84 (void)0;
mapellil 7:d79cbeda2982 85 #else
mapellil 7:d79cbeda2982 86 #define TOF_GESTURES_DEBUG(fmt, ... ) (void)0
mapellil 7:d79cbeda2982 87 #define TOF_GESTURES_DEBUG_SET_MODULES(modulesMask) (void)0
mapellil 7:d79cbeda2982 88 #endif
mapellil 7:d79cbeda2982 89
mapellil 7:d79cbeda2982 90 #endif /* TOF_GESTURES_PLATFORM_H_ */
mapellil 7:d79cbeda2982 91