Test program running on MAX32625MBED. Control through USB Serial commands using a terminal emulator such as teraterm or putty.
Dependencies: MaximTinyTester CmdLine MAX541 USBDevice
Diff: Test_Menu_MAX11410.cpp
- Revision:
- 30:9eb6eff512e7
- Parent:
- 29:7d0bc70036be
- Child:
- 31:8068c5394e0d
--- a/Test_Menu_MAX11410.cpp Fri Jul 26 01:24:51 2019 -0700 +++ b/Test_Menu_MAX11410.cpp Fri Jul 26 01:34:10 2019 -0700 @@ -56,7 +56,7 @@ #define IGNORE_AT_COMMANDS 1 #endif -//~ extern MAX11410 g_MAX11410_device; // defined in main.cpp +extern MAX11410 g_MAX11410_device; // defined in main.cpp bool MAX11410_menu_onEOLcommandParser(CmdLine & cmdLine) { @@ -249,7 +249,46 @@ { // // Menu @ -- print device configuration // cmdLine.serial().printf("\r\n @ -- (future) print device configuration"); - #warning "Not Implemented Yet: MAX11410 menu @ print device configuration" + #warning "Not Tested Yet: MAX11410 menu @ print device configuration" + // // + // print shadow register configuration + // + // shadow of write-only register CODE dddd_dddd_dddd_0000 + //~ int16_t CMD_1000_CODE; + // int index = 0; + // for (index = 0; index < 4; index++) + // { + // cmdLine.serial().printf("CODE %c=0x%4.4x MAX5715_VoltageOfCode(%d)=%5.3fV\r\n", + // (char)('A' + index), + // (g_MAX5715_device.Shadow_0010_nnnn_CODE[index] & 0xFFFF), + // g_MAX5715_device.CODE[index], + // g_MAX5715_device.VoltageOfCode(g_MAX5715_device.CODE[index]) + // ); + // } + // + // cmdLine.serial().printf("\r\n"); + // + //cmdLine.serial().printf("channelNumber_0_3=%d channels_bitmask_DCBA=%d\r\n", + // (g_MAX5715_device.channelNumber_0_3 & 0xFFFF), + // (g_MAX5715_device.channels_bitmask_DCBA & 0xFFFF)); + // + cmdLine.serial().printf("VRef=%5.6fV\r\n", g_MAX11410_device.VRef); + // dtostrf width and precision: 2.5V / 2^24 LSB = ______ volts per LSB + // + // shadow of register CMD_r011_1000_dddd_dddd_dddd_dddd_dxxx_dddd_STATUS + cmdLine.serial().printf("status=0x%6.6x\r\n", + g_MAX11410_device.status); + // + // shadow of register CMD_r011_0000_dddd_dddd_dddd_dddd_dddd_dddd_DATA0 + double voltage_of_data0; + voltage_of_data0 = g_MAX11410_device.VoltageOfCode(g_MAX11410_device.data0); + cmdLine.serial().printf("data0=0x%6.6x=%u=%d=%5.6fV\r\n", + g_MAX11410_device.data0, + g_MAX11410_device.data0, + g_MAX11410_device.data0, + voltage_of_data0); + // + return true; // command was handled by MAX11410 } break; } // end switch (cmdLine[0])