Test program running on MAX32625MBED. Control through USB Serial commands using a terminal emulator such as teraterm or putty.
Dependencies: MaximTinyTester CmdLine MAX541 USBDevice
Revision 32:ad00de965151, committed 2019-07-26
- Comitter:
- whismanoid
- Date:
- Fri Jul 26 03:28:52 2019 -0700
- Parent:
- 31:8068c5394e0d
- Commit message:
- MAX11410 future menu items 'W' 'R' regs; '@' VRef,status,data0 for test
Changed in this revision
Test_Menu_MAX11410.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Test_Menu_MAX11410.cpp Fri Jul 26 03:16:19 2019 -0700 +++ b/Test_Menu_MAX11410.cpp Fri Jul 26 03:28:52 2019 -0700 @@ -206,25 +206,26 @@ // regAddress range 0x00 .. 0x10 are 8-bit registers uint8_t regData; g_MAX11410_device.Read_8bit((MAX11410::MAX11410_CMD_enum_t)regAddress, ®Data); - cmdLine.serial().printf("regData=0x%2.2x\r\n", - regData); + cmdLine.serial().printf("r reg=0x%2.2x --> data=0x%2.2x\r\n", + regAddress, regData); } else if (regAddress <= MAX11410::CMD_r011_1001_dddd_dddd_dddd_dddd_dxxd_dddd_STATUS_IE) { // regAddress range 0x11 .. 0x39 are 24-bit registers uint32_t regData; g_MAX11410_device.Read_24bit((MAX11410::MAX11410_CMD_enum_t)regAddress, ®Data); - cmdLine.serial().printf("regData=0x%6.6lx\r\n", - regData); + cmdLine.serial().printf("r reg=0x%2.2x --> data=0x%6.6lx\r\n", + regAddress, regData); } else { // regAddress range 0x3a .. 0x6f are 16-bit registers uint16_t regData; g_MAX11410_device.Read_16bit((MAX11410::MAX11410_CMD_enum_t)regAddress, ®Data); - cmdLine.serial().printf("regData=0x%4.4x\r\n", - regData); + cmdLine.serial().printf("r reg=0x%2.2x --> data=0x%4.4x\r\n", + regAddress, regData); } + return true; // command was handled by MAX11410 } break; case 's': case 'S': @@ -234,6 +235,7 @@ g_MAX11410_device.Read_24bit(MAX11410::CMD_r011_1000_dddd_dddd_dddd_dddd_dxxx_dddd_STATUS, &g_MAX11410_device.status); cmdLine.serial().printf("status=0x%6.6lx\r\n", g_MAX11410_device.status); + return true; // command was handled by MAX11410 } break; // case 't': case 'T': @@ -255,8 +257,8 @@ { } g_MAX11410_device.Write_8bit((MAX11410::MAX11410_CMD_enum_t)regAddress, regData); - cmdLine.serial().printf("regData=0x%2.2x\r\n", - regData); + cmdLine.serial().printf("w reg=0x%2.2x data=0x%2.2x\r\n", + regAddress, regData); } else if (regAddress <= MAX11410::CMD_r011_1001_dddd_dddd_dddd_dddd_dxxd_dddd_STATUS_IE) { @@ -269,8 +271,8 @@ { } g_MAX11410_device.Write_24bit((MAX11410::MAX11410_CMD_enum_t)regAddress, regData); - cmdLine.serial().printf("regData=0x%6.6lx\r\n", - regData); + cmdLine.serial().printf("w reg=0x%2.2x data=0x%6.6lx\r\n", + regAddress, regData); } else { @@ -280,12 +282,13 @@ { } g_MAX11410_device.Write_16bit((MAX11410::MAX11410_CMD_enum_t)regAddress, regData); - cmdLine.serial().printf("regData=0x%4.4x\r\n", - regData); + cmdLine.serial().printf("w reg=0x%2.2x regData=0x%4.4x\r\n", + regAddress, regData); } // g_MAX11410_device.Write_8bit(MAX11410_CMD_enum_t regAddress, uint8_t regData) // g_MAX11410_device.Write_16bit(MAX11410_CMD_enum_t regAddress, uint16_t regData); // g_MAX11410_device.Write_24bit(MAX11410_CMD_enum_t regAddress, uint32_t regData); + return true; // command was handled by MAX11410 } break; case 'x': case 'X':