![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Test program using serial in RTOS
Dependencies: EthernetInterface mbed-rtos mbed
main.h@0:30562abde493, 2015-09-24 (annotated)
- Committer:
- Cypress
- Date:
- Thu Sep 24 22:24:28 2015 +0000
- Revision:
- 0:30562abde493
Initial commit, broken.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Cypress | 0:30562abde493 | 1 | #include "mbed.h" |
Cypress | 0:30562abde493 | 2 | #include "TCPSocketServer.h" |
Cypress | 0:30562abde493 | 3 | #include "TCPSocketConnection.h" |
Cypress | 0:30562abde493 | 4 | #include "EthernetInterface.h" |
Cypress | 0:30562abde493 | 5 | #include "Serial.h" |
Cypress | 0:30562abde493 | 6 | #include "RtosTimer.h" |
Cypress | 0:30562abde493 | 7 | |
Cypress | 0:30562abde493 | 8 | #define SP_RX PTC17 |
Cypress | 0:30562abde493 | 9 | #define SP_TX PTC16 |
Cypress | 0:30562abde493 | 10 | #define SP_BAUD 9600 |
Cypress | 0:30562abde493 | 11 | #define SP_UART UART3 |
Cypress | 0:30562abde493 | 12 | #define SP_TIMER_PERIOD 10 |
Cypress | 0:30562abde493 | 13 | #define SP_TIMEOUT 10 |
Cypress | 0:30562abde493 | 14 | |
Cypress | 0:30562abde493 | 15 | #define BUF_LEN 1023 |
Cypress | 0:30562abde493 | 16 | #define SERV_PORT 1234 |
Cypress | 0:30562abde493 | 17 | |
Cypress | 0:30562abde493 | 18 | int main ( void ); |
Cypress | 0:30562abde493 | 19 | void timerTask ( void ); |
Cypress | 0:30562abde493 | 20 | void rxInt ( void ); |
Cypress | 0:30562abde493 | 21 | void sendBuffer (char *buffer, int len); |
Cypress | 0:30562abde493 | 22 | void clearBuffer ( char *buffer, int len ); |
Cypress | 0:30562abde493 | 23 | void resetRX ( void ); |
Cypress | 0:30562abde493 | 24 | void resetTX ( void ); |