diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2009-11-07 17:54:56 +0000 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2009-11-07 17:54:56 +0000 |
commit | 6005c59ad03446153c66a991f01ac91c31d98dac (patch) | |
tree | 4c599359fd35066a81b8b9fe99042e325c03c6ed /libraries/Ethernet/Ethernet.cpp | |
parent | 584dece7b0c982de8731f7400c94b5034aef89e7 (diff) |
Moving libraries out of arduino platform / core directory and to top-level.
Diffstat (limited to 'libraries/Ethernet/Ethernet.cpp')
-rw-r--r-- | libraries/Ethernet/Ethernet.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/libraries/Ethernet/Ethernet.cpp b/libraries/Ethernet/Ethernet.cpp deleted file mode 100644 index cb74876..0000000 --- a/libraries/Ethernet/Ethernet.cpp +++ /dev/null @@ -1,38 +0,0 @@ -extern "C" { - #include "types.h" - #include "w5100.h" -} - -#include "Ethernet.h" - -// XXX: don't make assumptions about the value of MAX_SOCK_NUM. -uint8_t EthernetClass::_state[MAX_SOCK_NUM] = { 0, 0, 0, 0 }; -uint16_t EthernetClass::_server_port[MAX_SOCK_NUM] = { 0, 0, 0, 0 }; - -void EthernetClass::begin(uint8_t *mac, uint8_t *ip) -{ - uint8_t gateway[4]; - gateway[0] = ip[0]; - gateway[1] = ip[1]; - gateway[2] = ip[2]; - gateway[3] = 1; - begin(mac, ip, gateway); -} - -void EthernetClass::begin(uint8_t *mac, uint8_t *ip, uint8_t *gateway) -{ - uint8_t subnet[] = { 255, 255, 255, 0 }; - begin(mac, ip, gateway, subnet); -} - -void EthernetClass::begin(uint8_t *mac, uint8_t *ip, uint8_t *gateway, uint8_t *subnet) -{ - iinchip_init(); - sysinit(0x55, 0x55); - setSHAR(mac); - setSIPR(ip); - setGAR(gateway); - setSUBR(subnet); -} - -EthernetClass Ethernet; |