a

Dependencies:   4DGL-uLCD-SE EthernetInterface mbed rtos

Committer:
shekha_atrash
Date:
Sat Jun 25 01:00:58 2016 +0000
Revision:
1:40b4ffe15e4e
Parent:
0:d32f86ba2959
Child:
2:14a8a5475978
lcd library added;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shekha_atrash 0:d32f86ba2959 1 #include "mbed.h"
shekha_atrash 1:40b4ffe15e4e 2 #include "uLCD_4DGL.h"
shekha_atrash 0:d32f86ba2959 3
shekha_atrash 0:d32f86ba2959 4 Ethernet eth;
shekha_atrash 0:d32f86ba2959 5
shekha_atrash 0:d32f86ba2959 6 int main()
shekha_atrash 0:d32f86ba2959 7 {
shekha_atrash 0:d32f86ba2959 8 char buf[0x600];
shekha_atrash 0:d32f86ba2959 9
shekha_atrash 0:d32f86ba2959 10 while(1)
shekha_atrash 0:d32f86ba2959 11 {
shekha_atrash 0:d32f86ba2959 12 int size = eth.receive();
shekha_atrash 0:d32f86ba2959 13 if(size > 0)
shekha_atrash 0:d32f86ba2959 14 {
shekha_atrash 0:d32f86ba2959 15 eth.read(buf, size);
shekha_atrash 0:d32f86ba2959 16 printf("Destination: %02X:%02X:%02X:%02X:%02X:%02X\n",
shekha_atrash 0:d32f86ba2959 17 buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]);
shekha_atrash 0:d32f86ba2959 18 printf("Source: %02X:%02X:%02X:%02X:%02X:%02X\n",
shekha_atrash 0:d32f86ba2959 19 buf[6], buf[7], buf[8], buf[9], buf[10], buf[11]);
shekha_atrash 0:d32f86ba2959 20 }
shekha_atrash 0:d32f86ba2959 21
shekha_atrash 0:d32f86ba2959 22 wait(1);
shekha_atrash 0:d32f86ba2959 23 }
shekha_atrash 0:d32f86ba2959 24 }