WIZ Proto Makers 3th Network
Dependencies: WIZnetInterface mbed
Fork of WIZwiki-W7500-lecture by
Revision 4:fb02cd21f3dc, committed 2016-02-03
- Comitter:
- Ricky_Kwon
- Date:
- Wed Feb 03 06:16:20 2016 +0000
- Parent:
- 3:cb2bf9e077f0
- Commit message:
- add Link up
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r cb2bf9e077f0 -r fb02cd21f3dc main.cpp --- a/main.cpp Wed Feb 03 03:38:27 2016 +0000 +++ b/main.cpp Wed Feb 03 06:16:20 2016 +0000 @@ -5,9 +5,16 @@ EthernetInterface eth; - uint8_t mac_addr[6] = {0x00, 0x08, 0xDC, 0x00, 0x01, 0x02}; - eth.init(mac_addr, "192.168.0.180", "255.255.255.0", "192.168.0.1"); // USE Static IP - //eth.init(mac_addr); //Use DHCP + printf("Network"); + uint8_t mac_addr[6] = {0x00, 0x08, 0xDC, 0x00, 0x05, 0x01}; + //eth.init(mac_addr, "192.168.1.180", "255.255.255.0", "192.168.1.1"); // USE Static IP + eth.init(mac_addr); //Use DHCP + + while(1) { //Wait link up + if(eth.link() == true) + break; + } + eth.connect(); printf("IP Address is %s\r\n", eth.getIPAddress());