A mbed-os v5 driver for KX224-1053 (3 axis accelerometer, made by Rohm).

Dependents:   rohm-SensorShield-example mbed_blinky

Files at this revision

API Documentation at this revision

Comitter:
MACRUM
Date:
Wed Feb 27 04:43:05 2019 +0000
Parent:
0:c447f35ff54a
Commit message:
Disable debug print by default

Changed in this revision

KX224.cpp Show annotated file Show diff for this revision Revisions of this file
KX224.h Show annotated file Show diff for this revision Revisions of this file
diff -r c447f35ff54a -r b226b04d2c21 KX224.cpp
--- a/KX224.cpp	Mon Feb 18 13:03:38 2019 +0900
+++ b/KX224.cpp	Wed Feb 27 04:43:05 2019 +0000
@@ -85,7 +85,6 @@
     default:
     	DEBUG_PRINT("\r!!! rgsel value (0x%x) is invalid\r", gsel);
     	return 2;
-    	break;
   }
   return 0;
 }
diff -r c447f35ff54a -r b226b04d2c21 KX224.h
--- a/KX224.h	Mon Feb 18 13:03:38 2019 +0900
+++ b/KX224.h	Wed Feb 27 04:43:05 2019 +0000
@@ -63,12 +63,9 @@
 #define KX224_CNTL1_VAL           (KX224_CNTL1_RES | KX224_CNTL1_GSEL_8G)
 #define KX224_ODCNTL_VAL          (KX224_ODCNTL_OSA_50HZ)
 
-#define _DEBUG
-
 #ifdef _DEBUG
 #undef DEBUG_PRINT
-extern Serial pc;
-#define DEBUG_PRINT(...) pc.printf(__VA_ARGS__)
+#define DEBUG_PRINT(...) printf(__VA_ARGS__)
 #else
 #define DEBUG_PRINT(...)
 #endif