protegemed, aquisição via A/D simples utilizando interrupção do timer
Dependencies: EthernetInterface NTPClient mbed-rtos mbed
Fork of ptgm_semDMA by
Codes/TelnetCommands/telnet_help.cpp@0:fac116e94d44, 2016-01-05 (annotated)
- Committer:
- rebonatto
- Date:
- Tue Jan 05 11:47:35 2016 +0000
- Revision:
- 0:fac116e94d44
Vers?o est?vel sem DMA e FFT. 128 amostras.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rebonatto | 0:fac116e94d44 | 1 | |
rebonatto | 0:fac116e94d44 | 2 | #include "TelnetServer.h" |
rebonatto | 0:fac116e94d44 | 3 | |
rebonatto | 0:fac116e94d44 | 4 | |
rebonatto | 0:fac116e94d44 | 5 | char *header_msg_help = "This is a list of available commands:\r\n\r\n"; |
rebonatto | 0:fac116e94d44 | 6 | |
rebonatto | 0:fac116e94d44 | 7 | int TelnetServer::HelpCommand(TCPSocketConnection *conn, char ** argv,int argc) |
rebonatto | 0:fac116e94d44 | 8 | { |
rebonatto | 0:fac116e94d44 | 9 | printf("Entering help command...\n"); |
rebonatto | 0:fac116e94d44 | 10 | |
rebonatto | 0:fac116e94d44 | 11 | conn->send(header_msg_help,strlen(header_msg_help)); |
rebonatto | 0:fac116e94d44 | 12 | |
rebonatto | 0:fac116e94d44 | 13 | int i; |
rebonatto | 0:fac116e94d44 | 14 | for(i=0;(unsigned int)cmds[i].pfn != 0;i++) |
rebonatto | 0:fac116e94d44 | 15 | { |
rebonatto | 0:fac116e94d44 | 16 | |
rebonatto | 0:fac116e94d44 | 17 | Thread::wait(20); |
rebonatto | 0:fac116e94d44 | 18 | conn->send(cmds[i].command_name,strlen(cmds[i].command_name)); |
rebonatto | 0:fac116e94d44 | 19 | |
rebonatto | 0:fac116e94d44 | 20 | //printf("cmd=%s\n",cmds[i].command_name); |
rebonatto | 0:fac116e94d44 | 21 | conn->send("\r\n",2); |
rebonatto | 0:fac116e94d44 | 22 | } |
rebonatto | 0:fac116e94d44 | 23 | |
rebonatto | 0:fac116e94d44 | 24 | return 0; |
rebonatto | 0:fac116e94d44 | 25 | } |