Library to handle the X-NUCLEO-6180XA1 Proximity and ambient light sensor expansion board based on VL6180X.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: HelloWorld_6180XA1 SunTracker_BLE Servo_6180XA1 BLE_HR_Light ... more
Fork of X_NUCLEO_6180XA1 by
X-NUCLEO-6180XA1 Proximity and Ambient Light Sensor Expansion Board Firmware Package
Introduction
This firmware package includes Components Device Drivers and Board Support Package for STMicroelectronics' X-NUCLEO-6180XA1 Proximity and ambient light sensor expansion board based on VL6180X.
Firmware Library
Class X_NUCLEO_6180XA1 is intended to represent the Proximity and ambient light sensor expansion board with the same name.
The expansion board is providing the support of the following components:
- on-board VL6180X proximity and ambient light sensor,
- up to three additional VL6180X Satellites,
- on-board 4-digit display
It is intentionally implemented as a singleton because only one X-NUCLEO-VL6180XA1 at a time might be deployed in a HW component stack. In order to get the singleton instance you have to call class method `Instance()`, e.g.:
// Sensors expansion board singleton instance static X_NUCLEO_6180XA1 *6180X_expansion_board = X_NUCLEO_6180XA1::Instance();
Arduino Connector Compatibility Warning
Using the X-NUCLEO-6180XA1 expansion board with the NUCLEO-F429ZI
requires adopting the following patch:
- to remove R46 resistor connected to
A3
pin; - to solder R47 resistor connected to
A5
pin.
Alternatively, you can route the Nucleo board’s A5
pin directly to the expansion board’s A3
pin with a wire.
In case you patch your expansion board or route the pin, the interrupt signal for the front sensor will be driven on A5
pin rather than on A3
pin.
Example Applications
Components/VL6180X/vl6180x_types.h@1:1de1ea2994d9, 2015-09-09 (annotated)
- Committer:
- gallonm
- Date:
- Wed Sep 09 16:00:39 2015 +0000
- Revision:
- 1:1de1ea2994d9
- Child:
- 57:fa4c622b04a7
Added some files
Who changed what in which revision?
User | Revision | Line number | New 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 | |
gallonm | 1:1de1ea2994d9 | 29 | #ifndef VL6180x_TYPES_H_ |
gallonm | 1:1de1ea2994d9 | 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 | |
gallonm | 1:1de1ea2994d9 | 62 | #endif /* VL6180x_TYPES_H_ */ |