mbed library for STMicroelectronics' X-NUCLEO-IKA01A1 expansion board.

Dependents:   HelloWorld_IKA01A1

Fork of X_NUCLEO_IKA01A1 by ST Expansion SW Team

Library for STMicroelectronics' X-NUCLEO-IKA01A1 multifunctional expansion board based on operational amplifiers.

Files at this revision

API Documentation at this revision

Comitter:
Davidroid
Date:
Thu Jul 13 15:46:02 2017 +0000
Parent:
22:ff8d071bf79e
Commit message:
Adapting to ARM mbed coding style.

Changed in this revision

XNucleoIKA01A1.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r ff8d071bf79e -r 807f66b435d6 XNucleoIKA01A1.cpp
--- a/XNucleoIKA01A1.cpp	Tue May 09 11:49:16 2017 +0000
+++ b/XNucleoIKA01A1.cpp	Thu Jul 13 15:46:02 2017 +0000
@@ -95,14 +95,14 @@
 								  		 PinName ledDriverPin, 
 								  		 double ledDriverPeriod_us)
 {
-	if (_instance == NULL)
-	{
+	if (_instance == NULL) {
 		/* Instantiating the board. */
 		_instance = new XNucleoIKA01A1(instrumentAmpPin, currentSensorPin, photoSensorPin, windCmpSignalPin_1, windCmpSignalPin_2, ledDriverPin, ledDriverPeriod_us);
 
 		/* Initializing the components. */
-		if (!_instance->init())
+		if (!_instance->init()) {
 			error("Initialization of the X_NUCLEO_IKA01A1 expansion board failed.\n");
+		}
 	}
 
 	return _instance;
@@ -137,8 +137,7 @@
 	/* Verifying identity. */
 	uint8_t id = 0;
 	int ret = tsz124->read_id(&id);
-	if ((ret != COMPONENT_OK) || (id != I_AM_TSZ124))
-	{
+	if ((ret != COMPONENT_OK) || (id != I_AM_TSZ124)) {
 		delete tsz124;
 		tsz124 = NULL;
 		return true;
@@ -155,8 +154,9 @@
 	 *------------------------------------------------------------------------*/
 
 	/* Initialization. */
-	if (tsz124->init(&init_structure) != COMPONENT_OK)
+	if (tsz124->init(&init_structure) != COMPONENT_OK) {
 		return false;
+	}
 
 	return true;
 }
@@ -171,8 +171,7 @@
 	/* Verifying identity. */
 	uint8_t id = 0;
 	int ret = tsu104->read_id(&id);
-	if ((ret != COMPONENT_OK) || (id != I_AM_TSU104))
-	{
+	if ((ret != COMPONENT_OK) || (id != I_AM_TSU104)) {
 		delete tsu104;
 		tsu104 = NULL;
 		return true;
@@ -189,8 +188,9 @@
 	 *------------------------------------------------------------------------*/
 
 	/* Initialization. */
-	if (tsu104->init(&init_structure) != COMPONENT_OK)
+	if (tsu104->init(&init_structure) != COMPONENT_OK) {
 		return false;
+	}
 
 	return true;
 }
@@ -205,8 +205,7 @@
 	/* Verifying identity. */
 	uint8_t id = 0;
 	int ret = tsv734->read_id(&id);
-	if ((ret != COMPONENT_OK) || (id != I_AM_TSV734))
-	{
+	if ((ret != COMPONENT_OK) || (id != I_AM_TSV734)) {
 		delete tsv734;
 		tsv734 = NULL;
 		return true;
@@ -223,8 +222,9 @@
 	 *------------------------------------------------------------------------*/
 
 	/* Initialization. */
-	if (tsv734->init(&init_structure) != COMPONENT_OK)
+	if (tsv734->init(&init_structure) != COMPONENT_OK) {
 		return false;
+	}
 
 	return true;
 }