Javascript wrappers for LSM303AGR Sensor library
Dependencies: LSM303AGR
LSM303AGR_JS-js.h@2:ddbdfca82832, 2017-10-25 (annotated)
- Committer:
- akhtar.syedzeeshan@gmail.com
- Date:
- Wed Oct 25 14:00:26 2017 +0200
- Revision:
- 2:ddbdfca82832
- Parent:
- 0:23a17bd32990
- Child:
- 4:ae1fba759405
Fully implemented DevI2C support
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 1 | /** |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 2 | ****************************************************************************** |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 3 | * @file LSM303AGR_JS-js.h |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 4 | * @author ST |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 5 | * @version V1.0.0 |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 6 | * @date 9 October 2017 |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 7 | * @brief Implementation of an LSM303AGR Accelerometer and Magnetometer sensor for |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 8 | * use with Javascript. |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 9 | ****************************************************************************** |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 10 | * @attention |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 11 | * |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 12 | * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 13 | * |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 14 | * Redistribution and use in source and binary forms, with or without modification, |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 15 | * are permitted provided that the following conditions are met: |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 17 | * this list of conditions and the following disclaimer. |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 19 | * this list of conditions and the following disclaimer in the documentation |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 20 | * and/or other materials provided with the distribution. |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 22 | * may be used to endorse or promote products derived from this software |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 23 | * without specific prior written permission. |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 24 | * |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 35 | * |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 36 | ****************************************************************************** |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 37 | */ |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 38 | |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 39 | /* Prevent recursive inclusion -----------------------------------------------*/ |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 40 | |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 41 | #ifndef _LSM303AGR_JS_JS_H |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 42 | #define _LSM303AGR_JS_JS_H |
akhtar.syedzeeshan@gmail.com | 2:ddbdfca82832 | 43 | |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 44 | /* Includes ------------------------------------------------------------------*/ |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 45 | |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 46 | // This file contains all the macros |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 47 | #include "jerryscript-mbed-library-registry/wrap_tools.h" |
akhtar.syedzeeshan@gmail.com | 2:ddbdfca82832 | 48 | |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 49 | // Class constructor |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 50 | DECLARE_CLASS_CONSTRUCTOR(LSM303AGR_JS); |
akhtar.syedzeeshan@gmail.com | 2:ddbdfca82832 | 51 | |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 52 | // Define a wrapper, we can load the wrapper in `main.cpp`. |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 53 | // This makes it possible to load libraries optionally. |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 54 | DECLARE_JS_WRAPPER_REGISTRATION (LSM303AGR_JS_library) { |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 55 | REGISTER_CLASS_CONSTRUCTOR(LSM303AGR_JS); |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 56 | } |
akhtar.syedzeeshan@gmail.com | 2:ddbdfca82832 | 57 | |
akhtar.syedzeeshan@gmail.com | 0:23a17bd32990 | 58 | #endif |