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