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.
Dependencies: max32625pico maxim-dev mbed-rtos USBDevice
Fork of PICO_USB_I2C_SPI by
Diff: main.cpp
- Revision:
- 19:1a13f0c067b1
- Parent:
- 17:43cc59f768af
- Child:
- 20:166e033d5073
diff -r a6d2db32f84e -r 1a13f0c067b1 main.cpp --- a/main.cpp Tue Nov 28 05:58:33 2017 +0000 +++ b/main.cpp Tue Nov 28 06:07:43 2017 +0000 @@ -46,6 +46,7 @@ } chip_t; void showRegisters(char* regs) { + // Datasheet table 28 "Register Default Values" int i; for (i = 0; i < 0x20; i++) { serial.printf("%02X ", regs[i]); @@ -53,7 +54,9 @@ serial.printf("\r\n"); if (regs[0] != 0x01) return; chip_t chipType = UNKNOWN; + // regs[6] BoostCfg if (regs[6] == 0xC0) { + // regs[7] BuckVSet switch(regs[7]) { case 0x08: chipType = MAX14750A; break; case 0x20: chipType = MAX14750B; break; @@ -62,6 +65,7 @@ } } else if (regs[6] == 0xE0) { bool aOrB = false; + // regs[9] BuckISet switch(regs[9]) { case 0xA7: aOrB = true; break; case 0x07: chipType = MAX14720C; break; @@ -69,6 +73,7 @@ default: break; } if (aOrB) { + // regs[B] LDOCfg if (regs[0x0B] == 0x80) { chipType = MAX14720A; } else if (regs[0x0B] == 0xE1) {