Driver for the HSCDTD008A Geomagnetic Sensor.

Dependents:   HSCDTD008A_Hello

Revision:
1:b90695c17177
Parent:
0:ccf912737de7
--- a/HSCDTD008A.h	Sun Jun 20 13:55:42 2021 +0000
+++ b/HSCDTD008A.h	Sun Jun 20 14:18:02 2021 +0000
@@ -1,21 +1,3 @@
-/*
- * Copyright (c) 2020 Zoltan Hudak <hudakz@outlook.com>
- * All rights reserved.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
 #ifndef HSCDTD008A_H
 #define HSCDTD008A_H
 
@@ -100,13 +82,13 @@
 class   HSCDTD008A
 {
 public:
-    HSCDTD008A(PinName sda, PinName scl, PinName drdy = NC, uint8_t addr = 0x0C);
+    HSCDTD008A(PinName sda, PinName scl, uint8_t addr = 0x0C);
     int16_t toInt16(uint16_t word);
     void    standbyMode();
     void    normalMode(uint8_t odr = 0b01, bool enableDataReady = false);
     void    forcedMode();
     void    softReset();
-    uint8_t selftest();
+    uint8_t selfTest();
     void    calibrateOffsets();
     void    setDriftOffsetX(uint16_t val);
     void    setDriftOffsetY(uint16_t val);
@@ -125,15 +107,11 @@
     float   x();
     float   y();
     float   z();
-    float   bearing();
 private:
     I2C*            _i2c;
-    InterruptIn     _drdy;
     const uint8_t   _addr;
     uint16_t        _x;
     uint16_t        _y;
     uint16_t        _z;
-    Thread          _thread;
-    EventQueue      _eventQueue;
 };
 #endif // HSCDTD008A_H