DevI2C wrappers for Javascript.

Dependents:   ST_SENSOR_JS MQTT_JS

Revision:
2:c899857665c6
Parent:
1:9004b187e772
--- a/DevI2C-js.cpp	Wed Oct 25 14:04:24 2017 +0200
+++ b/DevI2C-js.cpp	Wed Jan 17 10:51:57 2018 +0100
@@ -1,15 +1,14 @@
 /**
  ******************************************************************************
- * @file    LSM6DSL_JS-js.cpp
+ * @file    DevI2C-js.cpp
  * @author  ST
  * @version V1.0.0
  * @date    25 October 2017
- * @brief   Implementation of an LSM6DSL Accelerometer and gyroscope sensor for
- *          use with Javascript.
+ * @brief   Implementation of DevI2C for Javascript.
  ******************************************************************************
  * @attention
  *
- * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
+ * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
  *
  * Redistribution and use in source and binary forms, with or without modification,
  * are permitted provided that the following conditions are met:
@@ -51,8 +50,7 @@
 
 /**
  * DevI2C#destructor
- *
- * Called if/when the DevI2C object is GC'ed.
+ * @brief	Called if/when the DevI2C object is GC'ed.
  */
 void NAME_FOR_CLASS_NATIVE_DESTRUCTOR(DevI2C) (void *void_ptr) {
     delete static_cast<DevI2C*>(void_ptr);
@@ -60,8 +58,7 @@
 
 /**
  * Type infomation of the native DevI2C pointer
- *
- * Set DevI2C#destructor as the free callback.
+ * @brief	Set DevI2C#destructor as the free callback.
  */
 static const jerry_object_native_info_t native_obj_type_info = {
     .free_cb = NAME_FOR_CLASS_NATIVE_DESTRUCTOR(DevI2C)
@@ -69,8 +66,7 @@
 
 /**
  * DevI2C#frequency (native JavaScript method)
- *
- * Set the frequency of the DevI2C bus.
+ * @brief	Set the frequency of the DevI2C bus.
  *
  * @param frequency New DevI2C Frequency
  */
@@ -98,8 +94,7 @@
 
 /**
  * DevI2C#read (native JavaScript method)
- *
- * Read data from the DevI2C bus.
+ * @brief	Read data from the DevI2C bus.
  *
  * @overload DevI2C#read(int)
  * Read a single byte from the DevI2C bus
@@ -194,7 +189,8 @@
 
 /**
  * DevI2C#write (native JavaScript method)
- *
+ * @brief	Writes to DevI2C bus
+ * 
  * @overload DevI2C#write(int)
  * Write a single byte to the DevI2C bus
  *
@@ -277,8 +273,7 @@
 
 /**
  * DevI2C#start (native JavaScript method)
- *
- * Creates a start condition on the DevI2C bus.
+ * @brief	Creates a start condition on the DevI2C bus.
  */
 DECLARE_CLASS_FUNCTION(DevI2C, start) {
     CHECK_ARGUMENT_COUNT(DevI2C, start, (args_count == 0));
@@ -301,8 +296,7 @@
 
 /**
  * DevI2C#stop (native JavaScript method)
- *
- * Creates a stop condition on the DevI2C bus.
+ * @brief	Creates a stop condition on the DevI2C bus.
  */
 DECLARE_CLASS_FUNCTION(DevI2C, stop) {
     CHECK_ARGUMENT_COUNT(DevI2C, stop, (args_count == 0));
@@ -325,7 +319,7 @@
 
 /**
  * DevI2C (native JavaScript constructor)
- *
+ * @brief	Constructor
  * @param sda mbed pin for DevI2C data
  * @param scl mbed pin for DevI2C clock
  * @returns a JavaScript object representing the DevI2C bus.