Lab 1 Program C
Fork of mbed by
Diff: Ethernet.h
- Revision:
- 18:b3c9f16cbb96
- Parent:
- 11:1c1ebd0324fa
- Child:
- 20:029aa53d7323
--- a/Ethernet.h Tue Dec 01 14:24:15 2009 +0000 +++ b/Ethernet.h Mon May 17 14:18:54 2010 +0000 @@ -115,11 +115,27 @@ void address(char *mac); /* Function: link - * Returns if an ethernet link is pressent or not. + * Returns if an ethernet link is pressent or not. It takes a wile after Ethernet initializion to show up. * * Returns: * 0 - If no ethernet link is pressent. * 1 - If an ethernet link is pressent. + * + * Example: + * > // Using the Ethernet link function + * > #include "mbed.h" + * > + * > Ethernet eth; + * > + * > int main() { + * > wait(1); // Needed after startup. + * > if(eth.link()) { + * > printf("online\n"); + * > } else { + * > printf("offline\n"); + * > } + * > } + * */ int link();