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: mbed 4DGL-uLCD-SE RPCInterface
Revision 7:c912354e8870, committed 2020-04-07
- Comitter:
- emilywilson
- Date:
- Tue Apr 07 21:00:22 2020 +0000
- Parent:
- 6:96dd38c5d122
- Commit message:
- add rpc code
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/RPCInterface.lib Tue Apr 07 21:00:22 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/MichaelW/code/RPCInterface/#9d82e28ffaea
--- a/main.cpp Sun Apr 05 19:49:49 2020 +0000
+++ b/main.cpp Tue Apr 07 21:00:22 2020 +0000
@@ -1,19 +1,25 @@
#include "mbed.h"
+//#include "mbed_rpc.h"
+#include "SerialRPCInterface.h"
#include "uLCD_4DGL.h"
-Serial pc(USBTX, USBRX);
+SerialRPCInterface pc(USBTX, USBRX);
uLCD_4DGL lcd(p28,p27,p30);
+void printToLcd(Arguments *in, Reply *out);
+
+RPCFunction rpcPrintToLcd(&printToLcd, "printToLcd");
+
int main() {
- pc.baud(9600);
-
lcd.cls();
while (1) {
- if (pc.readable()) {
- lcd.printf("%c", pc.getc());
- }
wait(0.1);
}
+}
+
+void printToLcd(Arguments *in, Reply *out) {
+ const char* str = in->getArg<const char*>();
+ lcd.printf("%c", str);
}
\ No newline at end of file
--- a/mbed-rtos.lib Sun Apr 05 19:49:49 2020 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -https://os.mbed.com/users/mbed_official/code/mbed-rtos/#5713cbbdb706
--- a/mbed.bld Sun Apr 05 19:49:49 2020 +0000 +++ b/mbed.bld Tue Apr 07 21:00:22 2020 +0000 @@ -1,1 +1,1 @@ -https://mbed.org/users/mbed_official/code/mbed/builds/e1686b8d5b90 \ No newline at end of file +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file