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: pulga-lorawan-drv SX1272
Diff: serial_cmds.cpp
- Revision:
- 7:37dc9ce68914
- Child:
- 9:cf555a570349
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/serial_cmds.cpp Fri Mar 19 20:26:32 2021 +0000 @@ -0,0 +1,28 @@ +#include "serial.h" + + + +bool SerialCommandRun(const char *msg) +{ + char Option = msg[1]; /// recebo opcao + + switch (Option) + { + + + case CMD_SEND_HELLO: + { + pc.printf("hello word!\n"); + break;} + + case CMD_SEND_LORA_P2P: + { + pc.printf("<p %s>", msg[+2]); + char msg_p2p [256]; + strncpy(msg_p2p, msg+2, strlen(msg)); + send_msg(msg_p2p); + break;} + } + + return true; +}