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: AK9750.h
- Revision:
- 3:14f634433c89
- Parent:
- 1:4eefcf1d7351
diff -r 4eefcf1d7351 -r 14f634433c89 AK9750.h
--- a/AK9750.h Thu Jan 26 03:22:34 2017 +0000
+++ b/AK9750.h Thu Mar 23 08:42:16 2017 +0000
@@ -36,6 +36,14 @@
static const uint8_t DEVICE_ID = 0x13;
+ /* Interrupts */
+ static const unsigned INT_DR = 0x01; // Data ready
+ static const unsigned INT_IR24L = 0x02; // Lower threshold level
+ static const unsigned INT_IR24H = 0x04; // Upper threshold level
+ static const unsigned INT_IR13L = 0x08; // Lower threshold level
+ static const unsigned INT_IR13H = 0x10; // Upper threshold level
+
+public:
AK9750(I2C &i2c, PinName int1 = NC);
void ConfigDevice();
@@ -43,6 +51,10 @@
void GetData(Data *data);
int32_t GetTriggeredAreaNum(Data *data);
+ /* Interrupts */
+ void SetIntEvent(uint8_t int_enable, void(*fptr)(void));
+ uint8_t GetIntStatus();
+
private:
I2C &_i2c;
InterruptIn _int1;