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.
main.cpp@0:9777c29c1214, 2011-07-04 (annotated)
- Committer:
- NathanWhitaker
- Date:
- Mon Jul 04 14:18:05 2011 +0000
- Revision:
- 0:9777c29c1214
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| NathanWhitaker | 0:9777c29c1214 | 1 | #include "mbed.h" |
| NathanWhitaker | 0:9777c29c1214 | 2 | #include "rpc.h" |
| NathanWhitaker | 0:9777c29c1214 | 3 | #include "SerialRPCInterface.h" |
| NathanWhitaker | 0:9777c29c1214 | 4 | #include "Header.hpp" |
| NathanWhitaker | 0:9777c29c1214 | 5 | |
| NathanWhitaker | 0:9777c29c1214 | 6 | |
| NathanWhitaker | 0:9777c29c1214 | 7 | SerialRPCInterface RPC(USBTX, USBRX); |
| NathanWhitaker | 0:9777c29c1214 | 8 | |
| NathanWhitaker | 0:9777c29c1214 | 9 | RPCFunction L1_On(&LED1_ON, "LED1_On"); |
| NathanWhitaker | 0:9777c29c1214 | 10 | RPCFunction L2_On(&LED2_ON, "LED2_On"); |
| NathanWhitaker | 0:9777c29c1214 | 11 | RPCFunction L3_On(&LED3_ON, "LED3_On"); |
| NathanWhitaker | 0:9777c29c1214 | 12 | RPCFunction L4_On(&LED4_ON, "LED4_On"); |
| NathanWhitaker | 0:9777c29c1214 | 13 | RPCFunction L1_Off(&LED1_OFF, "LED1_Off_LONG"); |
| NathanWhitaker | 0:9777c29c1214 | 14 | RPCFunction L2_Off(&LED2_OFF, "LED2_Off_LONG"); |
| NathanWhitaker | 0:9777c29c1214 | 15 | RPCFunction L3_Off(&LED3_OFF, "LED3_Off_LONG"); |
| NathanWhitaker | 0:9777c29c1214 | 16 | RPCFunction L4_Off(&LED4_OFF, "LED4_Off_LONG_NAME"); |
| NathanWhitaker | 0:9777c29c1214 | 17 | |
| NathanWhitaker | 0:9777c29c1214 | 18 | |
| NathanWhitaker | 0:9777c29c1214 | 19 | |
| NathanWhitaker | 0:9777c29c1214 | 20 | int main() { |
| NathanWhitaker | 0:9777c29c1214 | 21 | while (1) { |
| NathanWhitaker | 0:9777c29c1214 | 22 | L1 = 1; |
| NathanWhitaker | 0:9777c29c1214 | 23 | wait(0.25); |
| NathanWhitaker | 0:9777c29c1214 | 24 | L1 = 0; |
| NathanWhitaker | 0:9777c29c1214 | 25 | wait(0.25); |
| NathanWhitaker | 0:9777c29c1214 | 26 | L1 = 1; |
| NathanWhitaker | 0:9777c29c1214 | 27 | wait(0.25); |
| NathanWhitaker | 0:9777c29c1214 | 28 | L1 = 0; |
| NathanWhitaker | 0:9777c29c1214 | 29 | wait(0.25); |
| NathanWhitaker | 0:9777c29c1214 | 30 | |
| NathanWhitaker | 0:9777c29c1214 | 31 | } |
| NathanWhitaker | 0:9777c29c1214 | 32 | } |