Code from liamg with few edits to init seria comml and output counter.
Fork of MKL05CLK by
main.cpp@1:dc4a581c6c4a, 2014-04-04 (annotated)
- Committer:
- donoman
- Date:
- Fri Apr 04 23:41:54 2014 +0000
- Revision:
- 1:dc4a581c6c4a
- Parent:
- 0:0d020b1f3308
- Child:
- 2:1328c14aca66
read ID;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
liamg | 0:0d020b1f3308 | 1 | #include "mbed.h" |
liamg | 0:0d020b1f3308 | 2 | #include "head.h" |
liamg | 0:0d020b1f3308 | 3 | |
liamg | 0:0d020b1f3308 | 4 | Serial pc(USBTX, USBRX); // tx, rx for debug terminal |
liamg | 0:0d020b1f3308 | 5 | DigitalOut myled(LED1); |
liamg | 0:0d020b1f3308 | 6 | |
donoman | 1:dc4a581c6c4a | 7 | |
liamg | 0:0d020b1f3308 | 8 | int main() { |
donoman | 1:dc4a581c6c4a | 9 | |
donoman | 1:dc4a581c6c4a | 10 | int cycle = 0; |
donoman | 1:dc4a581c6c4a | 11 | |
donoman | 1:dc4a581c6c4a | 12 | while(true){ |
donoman | 1:dc4a581c6c4a | 13 | pc.baud(9600); |
liamg | 0:0d020b1f3308 | 14 | |
liamg | 0:0d020b1f3308 | 15 | myled = 1; |
liamg | 0:0d020b1f3308 | 16 | wait(0.2); |
liamg | 0:0d020b1f3308 | 17 | myled = 0; |
liamg | 0:0d020b1f3308 | 18 | wait(0.2); |
liamg | 0:0d020b1f3308 | 19 | |
donoman | 1:dc4a581c6c4a | 20 | unsigned int ID=0; |
donoman | 1:dc4a581c6c4a | 21 | cycle++; |
liamg | 0:0d020b1f3308 | 22 | |
liamg | 0:0d020b1f3308 | 23 | ID=SIM_SDID; |
liamg | 0:0d020b1f3308 | 24 | pc.printf("Kinetis ID = %x \n",ID); |
donoman | 1:dc4a581c6c4a | 25 | pc.printf("CycleNo = %d \n", cycle); |
donoman | 1:dc4a581c6c4a | 26 | } |
liamg | 0:0d020b1f3308 | 27 | |
liamg | 0:0d020b1f3308 | 28 | |
liamg | 0:0d020b1f3308 | 29 | |
liamg | 0:0d020b1f3308 | 30 | } |