MAX11410 is a high speed, 24-bit Delta-Sigma ADC; small example program which can be changed by modifying the Hello_MAX11410.cpp source code and repeating the compile-build-upload cycle, providing straightforward code for easy adoption.
Dependencies: MAX11410 CmdLine USBDevice
Diff: Hello_MAX11410.cpp
- Revision:
- 7:234c36b342a4
- Parent:
- 6:ea1186a09255
- Child:
- 8:5615199d87ea
--- a/Hello_MAX11410.cpp Fri Mar 13 22:00:26 2020 +0000 +++ b/Hello_MAX11410.cpp Sun Mar 15 10:40:53 2020 +0000 @@ -184,9 +184,11 @@ // example code main function int main() { + // example code: serial port banner message + wait(3); // 3000ms timing delay function, platform-specific + cmdLine.serial().printf("\r\nHello_MAX11410\r\n"); + // CODE GENERATOR: example code: member function Init - wait(3); - cmdLine.serial().printf("\r\nHello_MAX11410\r\n"); // Initialize MAX11410 and verify device ID uint32_t g_SPI_SCLK_Hz = 24000000; // platform limit 24MHz intSPI_SCLK_Platform_Max_MHz * 1000000 if (g_MAX11410_device.Init() == 0) @@ -215,7 +217,7 @@ // g_SPI_dataMode = g_MAX11410_device.get_spi_dataMode(); while (g_MAX11410_device.Init() == 0) { - wait(3); + wait(3); // 3000ms timing delay function, platform-specific cmdLine.serial().printf("\r\nMAX11410 Init failed; retry...\r\n"); }