![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
sample code for LPC810 ToraGi I2C board. you can compile it by mbed compiler.
Fork of lpc810_helloworld by
main.cpp@1:67310303497a, 2014-08-27 (annotated)
- Committer:
- va009039
- Date:
- Wed Aug 27 04:14:22 2014 +0000
- Revision:
- 1:67310303497a
- Parent:
- 0:9b94dbd65a21
- Child:
- 2:3d19f6b24059
update mbed library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 0:9b94dbd65a21 | 1 | #include "mbed.h" |
va009039 | 0:9b94dbd65a21 | 2 | |
va009039 | 1:67310303497a | 3 | // LPC810 pinout |
va009039 | 1:67310303497a | 4 | #define dp1 P0_5 // nRESET |
va009039 | 1:67310303497a | 5 | #define dp2 P0_4 // WAKEUP |
va009039 | 1:67310303497a | 6 | #define dp3 // SWCLK |
va009039 | 1:67310303497a | 7 | #define dp4 // SWDIO |
va009039 | 1:67310303497a | 8 | #define dp5 P0_1 // nISP |
va009039 | 1:67310303497a | 9 | #define dp6 // VIN |
va009039 | 1:67310303497a | 10 | #define dp7 // GND |
va009039 | 1:67310303497a | 11 | #define dp8 P0_0 |
va009039 | 1:67310303497a | 12 | |
va009039 | 1:67310303497a | 13 | DigitalOut myled(dp8); |
va009039 | 0:9b94dbd65a21 | 14 | |
va009039 | 0:9b94dbd65a21 | 15 | int main() { |
va009039 | 0:9b94dbd65a21 | 16 | while(1) { |
va009039 | 0:9b94dbd65a21 | 17 | myled = 1; |
va009039 | 1:67310303497a | 18 | wait_ms(200); |
va009039 | 0:9b94dbd65a21 | 19 | myled = 0; |
va009039 | 1:67310303497a | 20 | wait_ms(200); |
va009039 | 0:9b94dbd65a21 | 21 | } |
va009039 | 0:9b94dbd65a21 | 22 | } |
va009039 | 1:67310303497a | 23 |