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.
Dependents: oldheating gps motorhome heating
Revision 3:7806ff3f1a2d, committed 2017-05-09
- Comitter:
- andrewboyson
- Date:
- Tue May 09 15:08:38 2017 +0000
- Parent:
- 2:ee4ec2d72525
- Child:
- 4:c95b09342a93
- Commit message:
- Removed FileSystem from within library and moved open to outside.
Changed in this revision
| log.cpp | Show annotated file Show diff for this revision Revisions of this file |
| log.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/log.cpp Sat Feb 04 18:45:41 2017 +0000
+++ b/log.cpp Tue May 09 15:08:38 2017 +0000
@@ -1,8 +1,6 @@
#include "mbed.h"
#include "time.h"
-#define LOG_FILE "/local/log.txt"
-
-LocalFileSystem local("local");
+#include "io.h"
#define BUFFER_LENGTH 4096
static char buffer[BUFFER_LENGTH];
@@ -20,6 +18,9 @@
//Only add if allowed
if (!enable) return;
+
+ IoPcUart.putc(c);
+
char* pNext;
//Work out what has to be sent
@@ -172,9 +173,8 @@
LogV(fmt, argptr);
va_end(argptr);
}
-void LogSave()
+void LogSave(FILE *fp)
{
- FILE *fp = fopen(LOG_FILE, "w");
LogEnumerateStart();
while(1)
{
--- a/log.h Sat Feb 04 18:45:41 2017 +0000 +++ b/log.h Tue May 09 15:08:38 2017 +0000 @@ -5,7 +5,7 @@ extern void LogTime(); extern void LogTimeF(char *fmt, ...); extern void LogTimeCrLf(char *); -extern void LogSave(void); +extern void LogSave(FILE *fp); extern void LogPush(char c); extern void LogEnumerateStart(void); extern int LogEnumerate(void);