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: freemaster_lib mbed
Diff: main.cpp
- Revision:
- 0:7e120363e4df
- Child:
- 2:34ce849975a0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Sep 10 08:53:14 2014 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+#include "freemaster_class.h"
+//Initialize FreeMASTER driver
+Freemaster fm(USBTX, USBRX);
+
+//Add global variables
+volatile unsigned short var16;
+volatile unsigned short var16inc = 100;
+
+//Registration of all variables to observe in the FreeMASTER tool
+FMSTR_TSA_TABLE_LIST_BEGIN()
+//Register all TSA tables
+
+FMSTR_TSA_TABLE_LIST_END()
+
+int main() {
+ //register global or static variables to FreeMASTER driver
+ fm.TsaAddVar(FMSTR_TSA_RW_VAR_CFG(var16inc, FMSTR_TSA_UINT16));
+ //register read only variable to FreeMASTER driver
+ fm.TsaAddVar(FMSTR_TSA_RO_VAR_CFG(var16, FMSTR_TSA_UINT16));
+
+ while(1) {
+ //execute demo code
+ var16+=var16inc;
+ //sample variable by the Recorder feature
+ fm.Recorder();
+ wait(0.0025);
+ }
+}