![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
4180 lab 5
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
diff -r 96dd38c5d122 -r c912354e8870 RPCInterface.lib --- /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
diff -r 96dd38c5d122 -r c912354e8870 main.cpp --- 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
diff -r 96dd38c5d122 -r c912354e8870 mbed-rtos.lib --- 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
diff -r 96dd38c5d122 -r c912354e8870 mbed.bld --- 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