![](/media/cache/profiles/8a76780c6f3cd22891a6e7926fb9ad1c.jpg.50x50_q85.jpg)
Code from liamg with few edits to init seria comml and output counter.
Fork of MKL05CLK by
main.cpp@0:0d020b1f3308, 2014-04-04 (annotated)
- Committer:
- liamg
- Date:
- Fri Apr 04 20:08:32 2014 +0000
- Revision:
- 0:0d020b1f3308
- Child:
- 1:dc4a581c6c4a
Hack to show Kinetis ID register
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 | |
liamg | 0:0d020b1f3308 | 6 | DigitalOut myled(LED1); |
liamg | 0:0d020b1f3308 | 7 | |
liamg | 0:0d020b1f3308 | 8 | int main() { |
liamg | 0:0d020b1f3308 | 9 | |
liamg | 0:0d020b1f3308 | 10 | myled = 1; |
liamg | 0:0d020b1f3308 | 11 | wait(0.2); |
liamg | 0:0d020b1f3308 | 12 | myled = 0; |
liamg | 0:0d020b1f3308 | 13 | wait(0.2); |
liamg | 0:0d020b1f3308 | 14 | |
liamg | 0:0d020b1f3308 | 15 | unsigned int ID=0; |
liamg | 0:0d020b1f3308 | 16 | |
liamg | 0:0d020b1f3308 | 17 | ID=SIM_SDID; |
liamg | 0:0d020b1f3308 | 18 | pc.printf("Kinetis ID = %x \n",ID); |
liamg | 0:0d020b1f3308 | 19 | |
liamg | 0:0d020b1f3308 | 20 | |
liamg | 0:0d020b1f3308 | 21 | |
liamg | 0:0d020b1f3308 | 22 | } |