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.
Dependents: w7500-paho-mqtt openHAB_mqtt_W7500 kakaoIoTchatbot w7500-RFID-mqtt
Fork of WIZnetInterface by
Revision 11:b319c1859f9b, committed 2015-06-16
- Comitter:
- Soohwan Kim
- Date:
- Tue Jun 16 12:54:49 2015 +0900
- Parent:
- 10:0d17643de5fd
- Child:
- 12:99e8386ba225
- Commit message:
- fixed syntax err
Changed in this revision
| arch/ext/W5500.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/arch/ext/W5500.cpp Tue Jun 16 11:24:30 2015 +0900
+++ b/arch/ext/W5500.cpp Tue Jun 16 12:54:49 2015 +0900
@@ -472,19 +472,20 @@
}
int ethernet_link(void) {
+
return (getPHYCFGR()& 0x01);
}
void ethernet_set_link(int speed, int duplex) {
uint32_t val=0;
if((speed < 0) || (speed > 1)) {
- val = (PHYCFGR_OPMDC_ALL)<<3;
+ val = (PHYCFGR_OPMDC_ALLA)<<3;
} else {
val = (((speed&0x01)<<1)+ (duplex&0x01))<<3;
}
- setPHYCFGR(PHYCFGR_RST&(PHYCFGR_OPMD|val);
+ setPHYCFGR(PHYCFGR_RST&(PHYCFGR_OPMD|val));
wait(0.2);
- setPHYCFGR((~PHYCFGR_RST)|(PHYCFGR_OPMD|val);
+ setPHYCFGR((~PHYCFGR_RST)|(PHYCFGR_OPMD|val));
wait(0.2);
}
