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.
Diff: main.cpp
- Revision:
- 3:c31e9e43554b
- Parent:
- 2:4c2328c61af7
- Child:
- 4:6650958e6eae
--- a/main.cpp Thu Dec 26 11:12:47 2019 +0000
+++ b/main.cpp Fri Dec 27 03:00:50 2019 +0000
@@ -6,7 +6,7 @@
* http://www.page.sannet.ne.jp/kenjia/index.html
* https://os.mbed.com/users/kenjiArai/
* Created: April 7th, 2018
- * Revised: December 26th, 2019
+ * Revised: December 27th, 2019
*/
// Include --------------------------------------------------------------------
@@ -107,10 +107,10 @@
if (fp != 0) {
pc.printf("%s%s", opening_msg0, opening_msg1);
fprintf(fp,"%s%s", opening_msg0, opening_msg1);
+ fclose(fp);
} else {
pc.printf("ERROR\r\n");
}
- fclose(fp);
while (pc.readable()) {
char c = pc.getc(); // dummy read
mon();
@@ -139,10 +139,10 @@
++data0, ++data1, ++data2, ++data3, ++data4, ++data5);
fprintf(fp, "%08d;%08d;%08d;%08d;%08d;%08d\r\n",
data0, data1, data2, data3, data4, data5);
+ fclose(fp);
} else {
pc.printf("ERROR\r\n");
}
- fclose(fp);
DBG("line:%3d\r\n", __LINE__);
uint32_t time_sd = tmr.read_ms();
pc.printf("time[ms]:%3d ,", time_sd);