initial commit, reads dev id
Revision 4:6ec3bc44f055, committed 2018-08-16
- Comitter:
- phonemacro
- Date:
- Thu Aug 16 19:53:01 2018 +0000
- Parent:
- 3:ad8f1059a0c5
- Child:
- 5:1f7b8cb07e26
- Commit message:
- updated to transform output
Changed in this revision
| MAX8614X.cpp | Show annotated file Show diff for this revision Revisions of this file |
| MAX8614X.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/MAX8614X.cpp Sat Aug 11 22:03:35 2018 +0000
+++ b/MAX8614X.cpp Thu Aug 16 19:53:01 2018 +0000
@@ -45,6 +45,14 @@
m_cs = 1;
}
+int MAX8614X::init()
+{
+ int ret = RTN_NO_ERROR;
+ m_ir.mode(PullUp);
+ m_ir.fall(Callback<void()>(this, &MAX8614X::irq_handler));
+
+ return ret;
+}
int MAX8614X::readRegister(uint8_t reg, uint8_t *data, int len)
{
m_cs = 0;
--- a/MAX8614X.h Sat Aug 11 22:03:35 2018 +0000
+++ b/MAX8614X.h Thu Aug 16 19:53:01 2018 +0000
@@ -225,6 +225,7 @@
MAX8614X(SPI &spiBus, DigitalOut &cs, PinName intPin);
~MAX8614X();
+ int init();
int readRegister(uint8_t reg, uint8_t *data, int len);