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: SDFileSystem max32630fthr USBDevice
Fork of FTHR_SD_Demo by
Diff: main.cpp
- Revision:
- 25:08b220797bd9
- Parent:
- 24:454dc350bb17
- Child:
- 26:9ae9d097253a
--- a/main.cpp Wed Mar 27 19:43:41 2019 +0000
+++ b/main.cpp Thu Mar 28 19:58:23 2019 +0000
@@ -26,6 +26,9 @@
#define OT07_GPIO_CTRL 0x21 // OT07 GPIO control
#define OT07_ROM_ID 0x30 // OT07 ROM_ID address of LSB?
+#define DEVICE_ACK 0
+#define DEVICE_NACK 1
+#define DEVICE_BAD_RESP 2
#define MAX_DEVICES 64 // Maximum number of rom devices allowed
#define ID_LENGTH 8 // Rom ID length in bytes
@@ -1030,7 +1033,10 @@
{
if(device_logged[j])
{
- fprintf(fp,",%.3f",T[j].tempC);
+ if(T[j].status == DEVICE_ACK)
+ fprintf(fp,",%.3f",T[j].tempC);
+ else
+ fprintf(fp,",---.---");
}
}
