a
Dependencies: 4DGL-uLCD-SE EthernetInterface mbed rtos
main.cpp
- Committer:
- shekha_atrash
- Date:
- 2016-06-25
- Revision:
- 0:d32f86ba2959
- Child:
- 1:40b4ffe15e4e
File content as of revision 0:d32f86ba2959:
#include "mbed.h" Ethernet eth; int main() { char buf[0x600]; while(1) { int size = eth.receive(); if(size > 0) { eth.read(buf, size); printf("Destination: %02X:%02X:%02X:%02X:%02X:%02X\n", buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]); printf("Source: %02X:%02X:%02X:%02X:%02X:%02X\n", buf[6], buf[7], buf[8], buf[9], buf[10], buf[11]); } wait(1); } }