meddahi hadj
/
hadjessais
DEUXIEME PROG
ethernet.cpp
- Committer:
- meddahihadj
- Date:
- 2015-02-19
- Revision:
- 1:32ebac4d3716
File content as of revision 1:32ebac4d3716:
#include "mbed.h" Ethernet eth; int ether() { 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); } }