X-Git-Url: https://git.llucax.com/z.facultad/66.09/etherled.git/blobdiff_plain/3978740ee545b373cfaa9f97b899b11c01a3d199..3f85b3197c02a63c0f7f057c0d92a3c98a98fdb7:/src/c/net.h?ds=sidebyside diff --git a/src/c/net.h b/src/c/net.h index 15bed4f..678513a 100644 --- a/src/c/net.h +++ b/src/c/net.h @@ -1,14 +1,18 @@ -#include "net.h" - -uint16 net_getw() -{ - byte b = net_getb(); - return (b << 8) + net_getb(); -} - -void net_putw(uint16 w) -{ - net_putb(w >> 8); /* parte alta */; - net_putb(w); /* parte baja */; -} +#ifndef _NET_H_ +#define _NET_H_ +#include "types.h" + +/** lee un byte de la placa de red */ +byte net_getb(); + +/** escribe un byte a la placa de red */ +void net_putb(byte); + +/** lee un word de la placa de red */ +uint16 net_getw(); + +/** escribe un word a la placa de red */ +void net_putw(uint16); + +#endif /* _NET_H_ */