Librairie adaptée au laboratoire 2

Dependencies:   ST_INTERFACES X_NUCLEO_COMMON

Fork of X_NUCLEO_6180XA1 by ST

Committer:
YROY2004
Date:
Fri Feb 02 10:43:07 2018 +0000
Revision:
59:32055c2ddac6
Parent:
57:fa4c622b04a7
Programme qui fait du I2C et de l'interface usager

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gallonm 1:1de1ea2994d9 1 /*******************************************************************************
gallonm 1:1de1ea2994d9 2 Copyright © 2014, STMicroelectronics International N.V.
gallonm 1:1de1ea2994d9 3 All rights reserved.
gallonm 1:1de1ea2994d9 4
gallonm 1:1de1ea2994d9 5 Redistribution and use in source and binary forms, with or without
gallonm 1:1de1ea2994d9 6 modification, are permitted provided that the following conditions are met:
gallonm 1:1de1ea2994d9 7 * Redistributions of source code must retain the above copyright
gallonm 1:1de1ea2994d9 8 notice, this list of conditions and the following disclaimer.
gallonm 1:1de1ea2994d9 9 * Redistributions in binary form must reproduce the above copyright
gallonm 1:1de1ea2994d9 10 notice, this list of conditions and the following disclaimer in the
gallonm 1:1de1ea2994d9 11 documentation and/or other materials provided with the distribution.
gallonm 1:1de1ea2994d9 12 * Neither the name of STMicroelectronics nor the
gallonm 1:1de1ea2994d9 13 names of its contributors may be used to endorse or promote products
gallonm 1:1de1ea2994d9 14 derived from this software without specific prior written permission.
gallonm 1:1de1ea2994d9 15
gallonm 1:1de1ea2994d9 16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
gallonm 1:1de1ea2994d9 17 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
gallonm 1:1de1ea2994d9 18 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
gallonm 1:1de1ea2994d9 19 NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS ARE DISCLAIMED.
gallonm 1:1de1ea2994d9 20 IN NO EVENT SHALL STMICROELECTRONICS INTERNATIONAL N.V. BE LIABLE FOR ANY
gallonm 1:1de1ea2994d9 21 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
gallonm 1:1de1ea2994d9 22 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
gallonm 1:1de1ea2994d9 23 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
gallonm 1:1de1ea2994d9 24 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
gallonm 1:1de1ea2994d9 25 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
gallonm 1:1de1ea2994d9 26 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
gallonm 1:1de1ea2994d9 27 ********************************************************************************/
gallonm 1:1de1ea2994d9 28
Davidroid 57:fa4c622b04a7 29 #ifndef VL6180X_TYPES_H_
Davidroid 57:fa4c622b04a7 30 #define VL6180X_TYPES_H_
gallonm 1:1de1ea2994d9 31
gallonm 1:1de1ea2994d9 32
gallonm 1:1de1ea2994d9 33 #include <stdint.h>
gallonm 1:1de1ea2994d9 34 #include <stddef.h> /* these is for NULL */
gallonm 1:1de1ea2994d9 35
gallonm 1:1de1ea2994d9 36 #ifndef NULL
gallonm 1:1de1ea2994d9 37 #error "review NULL definition or add required include "
gallonm 1:1de1ea2994d9 38 #endif
gallonm 1:1de1ea2994d9 39
gallonm 1:1de1ea2994d9 40 #if !defined(STDINT_H) && !defined(_GCC_STDINT_H) && !defined(__STDINT_DECLS) && !defined(_STDINT) && !defined(_STDINT_H)
gallonm 1:1de1ea2994d9 41
gallonm 1:1de1ea2994d9 42 #pragma message("Please review type definition of STDINT define for your platform and add to list above ")
gallonm 1:1de1ea2994d9 43
gallonm 1:1de1ea2994d9 44 /*
gallonm 1:1de1ea2994d9 45 * target platform do not provide stdint or use a different #define than above
gallonm 1:1de1ea2994d9 46 * to avoid seeing the message below addapt the #define list above or implement
gallonm 1:1de1ea2994d9 47 * all type and delete these pragma
gallonm 1:1de1ea2994d9 48 */
gallonm 1:1de1ea2994d9 49
gallonm 1:1de1ea2994d9 50 typedef unsigned int uint32_t;
gallonm 1:1de1ea2994d9 51 typedef int int32_t;
gallonm 1:1de1ea2994d9 52
gallonm 1:1de1ea2994d9 53 typedef unsigned short uint16_t;
gallonm 1:1de1ea2994d9 54 typedef short int16_t;
gallonm 1:1de1ea2994d9 55
gallonm 1:1de1ea2994d9 56 typedef unsigned char uint8_t;
gallonm 1:1de1ea2994d9 57
gallonm 1:1de1ea2994d9 58 typedef signed char int8_t;
gallonm 1:1de1ea2994d9 59
gallonm 1:1de1ea2994d9 60 #endif /* _STDINT_H */
gallonm 1:1de1ea2994d9 61
Davidroid 57:fa4c622b04a7 62 #endif /* VL6180X_TYPES_H_ */