INSAT Mini Project
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Fork of X_NUCLEO_6180XA1 by
x_nucleo_6180xa1.h@7:2dc81120c917, 2015-09-25 (annotated)
- Committer:
- gallonm
- Date:
- Fri Sep 25 12:12:51 2015 +0200
- Revision:
- 7:2dc81120c917
- Parent:
- 4:a5abf7757947
- Child:
- 10:4954b09b72d8
update files
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gallonm | 0:1fb1f010ac84 | 1 | /** |
gallonm | 0:1fb1f010ac84 | 2 | ****************************************************************************** |
gallonm | 0:1fb1f010ac84 | 3 | * @file x_nucleo_6180xa1.h |
gallonm | 0:1fb1f010ac84 | 4 | * @author AST / EST |
gallonm | 0:1fb1f010ac84 | 5 | * @version V0.0.1 |
gallonm | 0:1fb1f010ac84 | 6 | * @date 13-April-2015 |
gallonm | 0:1fb1f010ac84 | 7 | * @brief Header file for class X_NUCLEO_6180XA1 representing a X-NUCLEO-6180XA1 |
gallonm | 0:1fb1f010ac84 | 8 | * expansion board |
gallonm | 0:1fb1f010ac84 | 9 | ****************************************************************************** |
gallonm | 0:1fb1f010ac84 | 10 | * @attention |
gallonm | 0:1fb1f010ac84 | 11 | * |
gallonm | 0:1fb1f010ac84 | 12 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
gallonm | 0:1fb1f010ac84 | 13 | * |
gallonm | 0:1fb1f010ac84 | 14 | * Redistribution and use in source and binary forms, with or without modification, |
gallonm | 0:1fb1f010ac84 | 15 | * are permitted provided that the following conditions are met: |
gallonm | 0:1fb1f010ac84 | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
gallonm | 0:1fb1f010ac84 | 17 | * this list of conditions and the following disclaimer. |
gallonm | 0:1fb1f010ac84 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
gallonm | 0:1fb1f010ac84 | 19 | * this list of conditions and the following disclaimer in the documentation |
gallonm | 0:1fb1f010ac84 | 20 | * and/or other materials provided with the distribution. |
gallonm | 0:1fb1f010ac84 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
gallonm | 0:1fb1f010ac84 | 22 | * may be used to endorse or promote products derived from this software |
gallonm | 0:1fb1f010ac84 | 23 | * without specific prior written permission. |
gallonm | 0:1fb1f010ac84 | 24 | * |
gallonm | 0:1fb1f010ac84 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
gallonm | 0:1fb1f010ac84 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
gallonm | 0:1fb1f010ac84 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
gallonm | 0:1fb1f010ac84 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
gallonm | 0:1fb1f010ac84 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
gallonm | 0:1fb1f010ac84 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
gallonm | 0:1fb1f010ac84 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
gallonm | 0:1fb1f010ac84 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
gallonm | 0:1fb1f010ac84 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
gallonm | 0:1fb1f010ac84 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
gallonm | 0:1fb1f010ac84 | 35 | * |
gallonm | 0:1fb1f010ac84 | 36 | ****************************************************************************** |
gallonm | 0:1fb1f010ac84 | 37 | */ |
gallonm | 0:1fb1f010ac84 | 38 | |
gallonm | 0:1fb1f010ac84 | 39 | /* Define to prevent from recursive inclusion --------------------------------*/ |
gallonm | 0:1fb1f010ac84 | 40 | #ifndef __X_NUCLEO_6180XA1_H |
gallonm | 0:1fb1f010ac84 | 41 | #define __X_NUCLEO_6180XA1_H |
gallonm | 0:1fb1f010ac84 | 42 | |
gallonm | 0:1fb1f010ac84 | 43 | /* Includes ------------------------------------------------------------------*/ |
gallonm | 0:1fb1f010ac84 | 44 | #include "mbed.h" |
gallonm | 0:1fb1f010ac84 | 45 | #include "vl6180x_class.h" |
gallonm | 0:1fb1f010ac84 | 46 | #include "display_class.h" |
gallonm | 0:1fb1f010ac84 | 47 | #include "GPIO_expander_class.h" |
gallonm | 0:1fb1f010ac84 | 48 | #include "DevI2C.h" |
gallonm | 0:1fb1f010ac84 | 49 | |
gallonm | 4:a5abf7757947 | 50 | /* Classes--------------------------------------------------------------------*/ |
gallonm | 0:1fb1f010ac84 | 51 | |
gallonm | 4:a5abf7757947 | 52 | /*class X_NUCLEO_6180XA1 |
gallonm | 4:a5abf7757947 | 53 | { |
gallonm | 4:a5abf7757947 | 54 | protected: |
gallonm | 4:a5abf7757947 | 55 | |
gallonm | 4:a5abf7757947 | 56 | public: |
gallonm | 7:2dc81120c917 | 57 | X_NUCLEO_VL6180XA1(DevI2C *i2c)): dev_i2c(i2c), |
gallonm | 7:2dc81120c917 | 58 | vl6180x_top(new VL6180X()), |
gallonm | 7:2dc81120c917 | 59 | vl6180x_left(new VL6180X()), |
gallonm | 7:2dc81120c917 | 60 | vl6180x_bottom(new VL6180X()), |
gallonm | 7:2dc81120c917 | 61 | vl6180x_right(new VL6180X()), |
gallonm | 7:2dc81120c917 | 62 | display(new Display(i2c)), |
gallonm | 7:2dc81120c917 | 63 | gpio_expander(i2c)); |
gallonm | 4:a5abf7757947 | 64 | |
gallonm | 4:a5abf7757947 | 65 | |
gallonm | 7:2dc81120c917 | 66 | VL6180X *vl6180x_top; |
gallonm | 7:2dc81120c917 | 67 | VL6180X *vl6180x_left; |
gallonm | 7:2dc81120c917 | 68 | VL6180X *vl6180x_bottom; |
gallonm | 7:2dc81120c917 | 69 | VL6180X *vl6180x_right; |
gallonm | 4:a5abf7757947 | 70 | Display *display; |
gallonm | 4:a5abf7757947 | 71 | GPIO_expander *gpio_expander; |
gallonm | 4:a5abf7757947 | 72 | DevI2C *dev_i2c; |
gallonm | 4:a5abf7757947 | 73 | |
gallonm | 7:2dc81120c917 | 74 | X_NUCLEO_VL6180XA1 *Instance(DevI2C *i2c) |
gallonm | 7:2dc81120c917 | 75 | { |
gallonm | 7:2dc81120c917 | 76 | if(_instance==NULL) |
gallonm | 7:2dc81120c917 | 77 | _instance=new X_NUCLEO_6180XA1(i2c); |
gallonm | 7:2dc81120c917 | 78 | else |
gallonm | 7:2dc81120c917 | 79 | errore |
gallonm | 7:2dc81120c917 | 80 | } |
gallonm | 4:a5abf7757947 | 81 | |
gallonm | 4:a5abf7757947 | 82 | private: |
gallonm | 7:2dc81120c917 | 83 | static X_NUCLEO_6180XA1 *_instance; |
gallonm | 4:a5abf7757947 | 84 | |
gallonm | 4:a5abf7757947 | 85 | } |
gallonm | 4:a5abf7757947 | 86 | */ |
gallonm | 0:1fb1f010ac84 | 87 | |
gallonm | 0:1fb1f010ac84 | 88 | |
gallonm | 0:1fb1f010ac84 | 89 | |
gallonm | 7:2dc81120c917 | 90 | #endif /* __X_NUCLEO_6180XA1_H */ |