// vim: set et sw=4 sts=4 :
+#include "types.h"
#include "main.h"
-static xdata leds1 _at_ 0x0080;
-static xdata leds2 _at_ 0x00c0;
+#ifdef SDCC
+static byte xdata at 0x0080 leds1;
+static byte xdata at 0x00c0 leds2;
+#else
+static byte xdata leds1 _at_ 0x0080;
+static byte xdata leds2 _at_ 0x00c0;
+#endif
void sleep(unsigned char times)
{
void main(void)
{
+ unsigned char count = 1;
unsigned int len;
leds1 = ~0xff;
leds2 = ~0xff;
leds2 = ~0xaa;
- // leemos
- do
+ // leemos hasta el fin de nuestros dÃas
+ while (1)
{
+
len = etherdev_read();
if (len)
{
leds1 = ~0x55;
- leds2 = len;
- sleep(2);
+ leds2 = ~len;
+ sleep(0);
+ /*
for (len = 0; len < uip_len; ++len)
{
leds1 = ~(1 << (len % 8));
leds2 = ~uip_buf[len];
sleep(5);
}
- leds1 = ~0x55;
- leds2 = ~0x55;
+ */
+ //leds1 = ~0x33;
+ //leds2 = ~uip_buf[42];
+ //sleep(5);
+ uip_buf[13] = count++;
+ etherdev_send();
}
else
{
- leds1 = ~0xff;
- leds2 = ~0xff;
+ leds1 = ~0x00;
+ leds2 = ~0x00;
}
}
- while (1); // Quedamos paveando forever
}