Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: AS5601.cpp
- Revision:
 - 1:81d37343e965
 - Parent:
 - 0:f1ca084bfe47
 - Child:
 - 2:35dd35dc4a4a
 
--- a/AS5601.cpp	Wed Nov 27 15:10:17 2019 +0000
+++ b/AS5601.cpp	Wed Nov 27 16:42:34 2019 +0000
@@ -1,3 +1,4 @@
+#include "mbed.h"
 #include "AS5601.h"
 
 AS5601::AS5601(PinName sda, PinName scl, int ppr, int offset_val) : i2c(sda,scl)
@@ -5,7 +6,9 @@
     i2c.frequency(400000);
     
     offset = offset_val;
-    
+}
+
+void init(){
     //初期化
     //平均化数設定
     int conf1_set = read(CONF1_REG);