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:
- 2:35dd35dc4a4a
- Parent:
- 1:81d37343e965
--- a/AS5601.cpp Wed Nov 27 16:42:34 2019 +0000
+++ b/AS5601.cpp Wed Nov 27 18:05:03 2019 +0000
@@ -1,14 +1,15 @@
#include "mbed.h"
#include "AS5601.h"
-AS5601::AS5601(PinName sda, PinName scl, int ppr, int offset_val) : i2c(sda,scl)
+AS5601::AS5601(PinName sda, PinName scl, int ppr_val, int offset_val) : i2c(sda,scl)
{
i2c.frequency(400000);
offset = offset_val;
+ ppr = ppr_val;
}
-void init(){
+void AS5601::init(){
//初期化
//平均化数設定
int conf1_set = read(CONF1_REG);