Start of a microbit mpr121 library
Dependents: microbitmpr121-example
Diff: MicroBitMpr121.cpp
- Revision:
- 8:cda72c6b04c0
- Parent:
- 7:ac942cee2975
--- a/MicroBitMpr121.cpp Mon Jan 16 21:58:16 2017 +0000 +++ b/MicroBitMpr121.cpp Mon Jan 16 23:02:19 2017 +0000 @@ -101,10 +101,11 @@ return; } -void MicroBitMpr121::registerDump() const // What is the const purpose +void MicroBitMpr121::registerDump() { - for(int i=0; i<0x80; i++) { - printf("Reg 0x%02x: 0x%02x \n", i, MicroBitMpr121::read8(uint8_t(i)); + for(uint8_t i=0; i<0x80; i++) { + int response = read8(i); + printf("Reg 0x%02x: 0x%02x \n", i, response); } return; }