X-Git-Url: https://git.llucax.com/z.facultad/66.09/etherled.git/blobdiff_plain/b28157390ed405302bd3394b0ea139d1b5d70432..3be9796df73e200ae3778316a3ac696370731289:/pruebas/keil/red_test_anda/main.c diff --git a/pruebas/keil/red_test_anda/main.c b/pruebas/keil/red_test_anda/main.c index 43546b2..f2ef8f7 100644 --- a/pruebas/keil/red_test_anda/main.c +++ b/pruebas/keil/red_test_anda/main.c @@ -15,6 +15,7 @@ void sleep(unsigned char times) void main(void) { + unsigned char count = 1; unsigned int len; leds1 = ~0xff; leds2 = ~0xff; @@ -28,30 +29,35 @@ void main(void) 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); + //leds1 = ~0x55; + //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 }