]> git.llucax.com Git - z.facultad/66.09/etherled.git/blobdiff - src/main.c
Agrego informe.
[z.facultad/66.09/etherled.git] / src / main.c
index 69e0a54476655f3d405dd2a6e904b65e0c419651..9714789a5ad855b0e53a54c70cca47e7f46be20d 100644 (file)
@@ -27,7 +27,7 @@ void main(void)
 
     // Comienza a 'dibujar'
     EA  = 1; // Habilita interrupciones globalmente
-    //XXX TR2 = 1; // Pone a correr el 'dibujado'
+    ET2 = 1; // Pone a correr el 'dibujado'
 
     // Inicializo IP
     ip_addr_local[0] = 10;
@@ -76,42 +76,37 @@ void main(void)
                         // Procesamos comando ELP y obtenemos tamaño de la
                         // respuesta
                         len = elp_read_process_command();
-                        printb(len, 0x02);
+                        //printb(len, 0x02);
 
                         // Si el tamaño es 0, hubo error o no está soportado
                         if (!len)
                             goto drop;
-                        print(0x0004);
+                        //print(0x0004);
 
                         // FIXME por ahora no tenemos forma de 'abortar' el
                         // comando si el checksum es incorrecto, lo verificamos
                         // por deporte.
                         if (!udp_checksum_ok())
                             goto drop;
-                        print(0x0008);
+                        //print(0x0008);
 
                         // Terminamos recepción
                         netdev_recv_end();
-                        print(0x0010);
+                        //print(0x0010);
 
                         // Respuesta
                         netdev_send_start();
                         eth_write_frame_header();
                         ip_packet_len = UDP_HEADER_SIZE + len;
-                        printb(ip_packet_len, 0x20);
+                        //printb(ip_packet_len, 0x20);
                         ip_write_packet_header();
                         udp_dgram_len = len;
-                        printb(udp_dgram_len, 0x40);
+                        //printb(udp_dgram_len, 0x40);
                         udp_write_dgram_header();
                         elp_write_response();
                         udp_write_checksum(ETH_HEADER_SIZE + IP_HEADER_SIZE);
                         netdev_send_end(ETH_HEADER_SIZE + IP_HEADER_SIZE
                                 + UDP_HEADER_SIZE + len);
-                        printb(ETH_HEADER_SIZE + IP_HEADER_SIZE
-                                + UDP_HEADER_SIZE + len, 0x80);
-                        //XXX
-                        if (elp_command.set && (elp_command.var == ELP_VAR_PAUSE))
-                            TR2 = 1;
                 }
         }
         continue;