1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Fix compilation errors on examples and adapt API to new Ethernet functions

This commit is contained in:
mlafauci
2011-05-18 15:37:29 +02:00
parent 4f7e2f1201
commit 0b8d3f6421
16 changed files with 205 additions and 42 deletions

View File

@ -2,7 +2,7 @@
#include <string.h>
#include <stdint.h>
#include "WProgram.h"
#include "Arduino.h"
#include "spi_drv.h"
#include "wifi_drv.h"
@ -189,22 +189,25 @@ uint8_t* WiFiDrv::getMacAddress()
return _mac;
}
void WiFiDrv::getIpAddress(uint8_t *ip)
void WiFiDrv::getIpAddress(IPAddress& ip)
{
getNetworkData(_localIp, _subnetMask, _gatewayIp);
memcpy(ip, _localIp, WL_IPV4_LENGTH);
ip = _localIp;
//memcpy(ip, _localIp, WL_IPV4_LENGTH);
}
void WiFiDrv::getSubnetMask(uint8_t *ip)
void WiFiDrv::getSubnetMask(IPAddress& ip)
{
getNetworkData(_localIp, _subnetMask, _gatewayIp);
memcpy(ip, _subnetMask, WL_IPV4_LENGTH);
ip = _subnetMask;
//memcpy(ip, _subnetMask, WL_IPV4_LENGTH);
}
void WiFiDrv::getGatewayIP(uint8_t *ip)
void WiFiDrv::getGatewayIP(IPAddress& ip)
{
getNetworkData(_localIp, _subnetMask, _gatewayIp);
memcpy(ip, _gatewayIp, WL_IPV4_LENGTH);
ip = _gatewayIp;
//memcpy(ip, _gatewayIp, WL_IPV4_LENGTH);
}
char* WiFiDrv::getCurrentSSID()