jim hamblen
/
MAC_Print_LPC1768
Prints MAC address of an mbed LPC1768 on the USB virtual com port
main.cpp
- Committer:
- 4180_1
- Date:
- 2017-06-23
- Revision:
- 0:1c0018938474
File content as of revision 0:1c0018938474:
#include "mbed.h" extern "C" void mbed_mac_address(char *s); //prints MAC address - handy if MAC is needed for ethernet network setup Serial pc(USBTX,USBRX); int main() { char mac[6]; mbed_mac_address(mac); pc.printf("mbed MAC address is %02x:%02x:%02x:%02x:%02x:%02x\n\r", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); }