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:
@ -1,6 +1,6 @@
|
||||
#include "server_drv.h"
|
||||
|
||||
#include "WProgram.h"
|
||||
#include "Arduino.h"
|
||||
#include "spi_drv.h"
|
||||
|
||||
#define _DEBUG_
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
#include "WProgram.h"
|
||||
#include "Arduino.h"
|
||||
#include "spi_drv.h"
|
||||
#include "pins_arduino.h"
|
||||
#define _DEBUG_
|
||||
|
@ -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()
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "wifi_spi.h"
|
||||
#include "IPAddress.h"
|
||||
|
||||
#define KEY_IDX_LEN 1
|
||||
#define WL_DELAY_START_CONNECTION 5000
|
||||
@ -40,11 +41,11 @@ public:
|
||||
|
||||
static uint8_t* getMacAddress();
|
||||
|
||||
static void getIpAddress(uint8_t *ip);
|
||||
static void getIpAddress(IPAddress& ip);
|
||||
|
||||
static void getSubnetMask(uint8_t *ip);
|
||||
static void getSubnetMask(IPAddress& ip);
|
||||
|
||||
static void getGatewayIP(uint8_t *ip);
|
||||
static void getGatewayIP(IPAddress& ip);
|
||||
|
||||
static char* getCurrentSSID();
|
||||
|
||||
|
Reference in New Issue
Block a user