Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2018-10-17 16:00:52 +0300
committerDavid Crocker <dcrocker@eschertech.com>2018-10-17 16:00:52 +0300
commit54709646636d530aea6f4a93cba5401dc36b5309 (patch)
tree552bb569a9e7ad54b889e208b88eb148eb0f813c /src
parent1347ea638627e7969ea1fa6f059d497c8692925a (diff)
Version 2.02RC3 provisional
More refactoring of IP addresses in network code
Diffstat (limited to 'src')
-rw-r--r--src/Networking/ESP8266WiFi/WiFiInterface.cpp10
-rw-r--r--src/Networking/ESP8266WiFi/WiFiSocket.cpp2
-rw-r--r--src/Networking/LwipEthernet/GMAC/ethernet_sam.cpp (renamed from src/Networking/LwipEthernet/GMAC/ethernet_sam.c)34
-rw-r--r--src/Networking/LwipEthernet/GMAC/ethernet_sam.h28
-rw-r--r--src/Networking/LwipEthernet/GMAC/same70_gmac.h8
-rw-r--r--src/Networking/LwipEthernet/LwipEthernetInterface.cpp36
-rw-r--r--src/Networking/LwipEthernet/LwipEthernetInterface.h3
-rw-r--r--src/Networking/LwipEthernet/LwipSocket.cpp2
-rw-r--r--src/Networking/W5500Ethernet/W5500Interface.cpp2
-rw-r--r--src/Networking/W5500Ethernet/Wiznet/Ethernet/socketlib.cpp4
-rw-r--r--src/Networking/W5500Ethernet/Wiznet/Internet/DHCP/dhcp.cpp2
-rw-r--r--src/Pccb/Network.h9
-rw-r--r--src/SAME70xpld/Pins_SAME70xpld.h13
-rw-r--r--src/Version.h2
14 files changed, 74 insertions, 81 deletions
diff --git a/src/Networking/ESP8266WiFi/WiFiInterface.cpp b/src/Networking/ESP8266WiFi/WiFiInterface.cpp
index 3bbbcc33..3b3c64d6 100644
--- a/src/Networking/ESP8266WiFi/WiFiInterface.cpp
+++ b/src/Networking/ESP8266WiFi/WiFiInterface.cpp
@@ -658,7 +658,7 @@ void WiFiInterface::Spin(bool full)
Receiver<NetworkStatusResponse> status;
if (SendCommand(NetworkCommand::networkGetStatus, 0, 0, nullptr, 0, status) > 0)
{
- ipAddress.SetV4(status.Value().ipAddress);
+ ipAddress.SetV4LittleEndian(status.Value().ipAddress);
SafeStrncpy(actualSsid, status.Value().ssid, SsidLength);
}
InitSockets();
@@ -938,19 +938,19 @@ GCodeResult WiFiInterface::HandleWiFiCode(int mcode, GCodeBuffer &gb, const Stri
{
IPAddress temp;
gb.GetIPAddress(temp);
- config.ip = temp.GetV4();
+ config.ip = temp.GetV4LittleEndian();
}
if (ok && gb.Seen('J'))
{
IPAddress temp;
ok = gb.GetIPAddress(temp);
- config.gateway = temp.GetV4();
+ config.gateway = temp.GetV4LittleEndian();
}
if (ok && gb.Seen('K'))
{
IPAddress temp;
ok = gb.GetIPAddress(temp);
- config.netmask = temp.GetV4();
+ config.netmask = temp.GetV4LittleEndian();
}
if (ok)
{
@@ -1075,7 +1075,7 @@ GCodeResult WiFiInterface::HandleWiFiCode(int mcode, GCodeBuffer &gb, const Stri
{
IPAddress temp;
ok = gb.GetIPAddress(temp);
- config.ip = temp.GetV4();
+ config.ip = temp.GetV4LittleEndian();
config.channel = (gb.Seen('C')) ? gb.GetIValue() : 0;
}
else
diff --git a/src/Networking/ESP8266WiFi/WiFiSocket.cpp b/src/Networking/ESP8266WiFi/WiFiSocket.cpp
index fe22bd7b..5fbe6d45 100644
--- a/src/Networking/ESP8266WiFi/WiFiSocket.cpp
+++ b/src/Networking/ESP8266WiFi/WiFiSocket.cpp
@@ -170,7 +170,7 @@ void WiFiSocket::Poll(bool full)
}
localPort = resp.Value().localPort;
remotePort = resp.Value().remotePort;
- remoteIPAddress.SetV4(resp.Value().remoteIp);
+ remoteIPAddress.SetV4LittleEndian(resp.Value().remoteIp);
DiscardReceivedData();
if (state != SocketState::waitingForResponder)
{
diff --git a/src/Networking/LwipEthernet/GMAC/ethernet_sam.c b/src/Networking/LwipEthernet/GMAC/ethernet_sam.cpp
index c2329262..1b685f93 100644
--- a/src/Networking/LwipEthernet/GMAC/ethernet_sam.c
+++ b/src/Networking/LwipEthernet/GMAC/ethernet_sam.cpp
@@ -41,9 +41,12 @@
*
*/
-#include "ethernet_phy.h"
#include "ethernet_sam.h"
-#include <string.h>
+#include <cstring>
+
+extern "C" {
+
+#include "ethernet_phy.h"
/* lwIP includes */
#include "lwip/api.h"
@@ -60,7 +63,6 @@
#include "lwip/tcpip.h"
#include "netif/etharp.h"
-
/* Global variable containing MAC Config (hw addr, IP, GW, ...) */
struct netif gs_net_if;
@@ -89,7 +91,9 @@ static timers_info_t gs_timers_table[] = {
#endif
};
-extern uint32_t millis( void ) ;
+extern uint32_t millis();
+
+} // end extern "C"
/**
* \brief Process timing functions.
@@ -125,12 +129,12 @@ void ethernet_timers_update(void)
//************************************************************************************************************
// This sets the static IP configuration on-the-fly
-void ethernet_set_configuration(const uint8_t ipAddress[], const uint8_t netMask[], const uint8_t gateWay[])
+void ethernet_set_configuration(IPAddress ipAddress, IPAddress netMask, IPAddress gateWay)
{
ip4_addr_t x_ip_addr, x_net_mask, x_gateway;
- IP4_ADDR(&x_ip_addr, ipAddress[0], ipAddress[1], ipAddress[2], ipAddress[3]);
- IP4_ADDR(&x_net_mask, netMask[0], netMask[1], netMask[2], netMask[3]);
- IP4_ADDR(&x_gateway, gateWay[0], gateWay[1], gateWay[2], gateWay[3]);
+ x_ip_addr.addr = ipAddress.GetV4LittleEndian();
+ x_net_mask.addr = netMask.GetV4LittleEndian();
+ x_gateway.addr = gateWay.GetV4LittleEndian();
// use static IP address
netif_set_ipaddr(&gs_net_if, &x_ip_addr);
@@ -141,12 +145,12 @@ void ethernet_set_configuration(const uint8_t ipAddress[], const uint8_t netMask
/** \brief Initialize the Ethernet subsystem.
*
*/
-void init_ethernet(const uint8_t ipAddress[], const uint8_t netMask[], const uint8_t gateWay[])
+void init_ethernet(IPAddress ipAddress, IPAddress netMask, IPAddress gateWay)
{
ip4_addr_t x_ip_addr, x_net_mask, x_gateway;
- IP4_ADDR(&x_ip_addr, ipAddress[0], ipAddress[1], ipAddress[2], ipAddress[3]);
- IP4_ADDR(&x_net_mask, netMask[0], netMask[1], netMask[2], netMask[3]);
- IP4_ADDR(&x_gateway, gateWay[0], gateWay[1], gateWay[2], gateWay[3]);
+ x_ip_addr.addr = ipAddress.GetV4LittleEndian();
+ x_net_mask.addr = netMask.GetV4LittleEndian();
+ x_gateway.addr = gateWay.GetV4LittleEndian();
/* Initialize lwIP. */
lwip_init();
@@ -232,7 +236,9 @@ void ethernet_set_rx_callback(gmac_dev_tx_cb_t callback)
/*
* \brief Returns the current IP address
*/
-const uint8_t *ethernet_get_ipaddress()
+void ethernet_get_ipaddress(IPAddress& ipAddress, IPAddress& netMask, IPAddress& gateWay)
{
- return (uint8_t*)&gs_net_if.ip_addr.addr;
+ ipAddress.SetV4LittleEndian(gs_net_if.ip_addr.addr);
+ netMask.SetV4LittleEndian(gs_net_if.netmask.addr);
+ gateWay.SetV4LittleEndian(gs_net_if.gw.addr);
}
diff --git a/src/Networking/LwipEthernet/GMAC/ethernet_sam.h b/src/Networking/LwipEthernet/GMAC/ethernet_sam.h
index 46de9e67..0532dc88 100644
--- a/src/Networking/LwipEthernet/GMAC/ethernet_sam.h
+++ b/src/Networking/LwipEthernet/GMAC/ethernet_sam.h
@@ -44,21 +44,15 @@
#ifndef ETHERNET_SAM_H_INCLUDED
#define ETHERNET_SAM_H_INCLUDED
+#include <cstdint>
+#include <cstddef>
+#include <General/IPAddress.h>
+
#include "same70_gmac.h"
#include "lwip/netif.h"
-#include <stddef.h>
-
-/// @cond 0
-/**INDENT-OFF**/
-#ifdef __cplusplus
-extern "C" {
-#endif
-/**INDENT-ON**/
-/// @endcond
-
// Perform low-level initialisation of the network interface
-void init_ethernet(const uint8_t ipAddress[], const uint8_t netMask[], const uint8_t gateWay[]);
+void init_ethernet(IPAddress ipAddress, IPAddress netMask, IPAddress gateWay);
// Configure the ethernet interface
void ethernet_configure_interface(const uint8_t macAddress[], const char *hostname);
@@ -70,7 +64,7 @@ bool ethernet_establish_link(void);
bool ethernet_link_established(void);
// Update IPv4 configuration on demand
-void ethernet_set_configuration(const unsigned char ipAddress[], const unsigned char netMask[], const unsigned char gateWay[]);
+void ethernet_set_configuration(IPAddress ipAddress, IPAddress netMask, IPAddress gateWay);
// Must be called periodically to keep the LwIP timers running
void ethernet_timers_update(void);
@@ -82,15 +76,7 @@ void ethernet_task(void);
void ethernet_set_rx_callback(gmac_dev_tx_cb_t callback);
// Returns the network interface's current IPv4 address
-const uint8_t *ethernet_get_ipaddress();
-
+void ethernet_get_ipaddress(IPAddress& ipAddress, IPAddress& netMask, IPAddress& gateWay);
-/// @cond 0
-/**INDENT-OFF**/
-#ifdef __cplusplus
-}
-#endif
-/**INDENT-ON**/
-/// @endcond
#endif /* ETHERNET_SAM_H_INCLUDED */
diff --git a/src/Networking/LwipEthernet/GMAC/same70_gmac.h b/src/Networking/LwipEthernet/GMAC/same70_gmac.h
index 1cb25970..fe263623 100644
--- a/src/Networking/LwipEthernet/GMAC/same70_gmac.h
+++ b/src/Networking/LwipEthernet/GMAC/same70_gmac.h
@@ -45,6 +45,10 @@
#ifndef ETHERNETIF_H_INCLUDED
#define ETHERNETIF_H_INCLUDED
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "lwip/err.h"
#include "lwip/ip_addr.h"
#include "lwip/netif.h"
@@ -70,4 +74,8 @@ void ethernetif_set_mac_address(const uint8_t macAddress[]);
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ETHERNETIF_H_INCLUDED */
diff --git a/src/Networking/LwipEthernet/LwipEthernetInterface.cpp b/src/Networking/LwipEthernet/LwipEthernetInterface.cpp
index 90b47523..368013b7 100644
--- a/src/Networking/LwipEthernet/LwipEthernetInterface.cpp
+++ b/src/Networking/LwipEthernet/LwipEthernetInterface.cpp
@@ -19,10 +19,10 @@
#include "Networking/TelnetResponder.h"
#include "General/IP4String.h"
#include "Version.h"
+#include "GMAC/ethernet_sam.h"
extern "C"
{
-#include "GMAC/ethernet_sam.h"
#ifdef LWIP_STATS
#include "lwip/stats.h"
@@ -348,10 +348,11 @@ void LwipEthernetInterface::Exit()
// Get the network state into the reply buffer, returning true if there is some sort of error
GCodeResult LwipEthernetInterface::GetNetworkState(const StringRef& reply)
{
+ ethernet_get_ipaddress(ipAddress, netmask, gateway);
const int enableState = EnableState();
reply.printf("Ethernet is %s, configured IP address: %s, actual IP address: %s",
(enableState == 0) ? "disabled" : "enabled",
- IP4String(platform.GetIPAddress()).c_str(), IP4String(ethernet_get_ipaddress()).c_str());
+ IP4String(platform.GetIPAddress()).c_str(), IP4String(ipAddress).c_str());
return GCodeResult::ok;
}
@@ -369,11 +370,7 @@ void LwipEthernetInterface::Start()
// Allow the MAC address to be set only before LwIP is started...
ethernet_configure_interface(platform.GetDefaultMacAddress(), hostname);
- uint8_t ipAddress[4], netmask[4], gateway[4];
- DefaultIpAddress.UnpackV4(ipAddress);
- DefaultNetMask.UnpackV4(netmask);
- DefaultGateway.UnpackV4(gateway);
- init_ethernet(ipAddress, netmask, gateway);
+ init_ethernet(DefaultIpAddress, DefaultNetMask, DefaultGateway);
// Initialise mDNS subsystem
mdns_resp_init();
@@ -424,7 +421,7 @@ void LwipEthernetInterface::Spin(bool full)
// IP address is all zeros, so use DHCP
state = NetworkState::obtainingIP;
// debugPrintf("Link established, getting IP address\n");
- uint8_t nullAddress[4] = { 0, 0, 0, 0 };
+ IPAddress nullAddress;
ethernet_set_configuration(nullAddress, nullAddress, nullAddress);
dhcp_start(&gs_net_if);
}
@@ -433,11 +430,7 @@ void LwipEthernetInterface::Spin(bool full)
// Using static IP address
state = NetworkState::connected;
// debugPrintf("Link established, network running\n");
- uint8_t ipAddress[4], netmask[4], gateway[4];
- platform.GetIPAddress().UnpackV4(ipAddress);
- platform.NetMask().UnpackV4(netmask);
- platform.GateWay().UnpackV4(gateway);
- ethernet_set_configuration(ipAddress, netmask, gateway);
+ ethernet_set_configuration(platform.GetIPAddress(), platform.NetMask(), platform.GateWay());
}
}
break;
@@ -451,8 +444,8 @@ void LwipEthernetInterface::Spin(bool full)
DoEthernetTask();
// Have we obtained an IP address yet?
- const uint8_t * const ip = ethernet_get_ipaddress();
- if (ip[0] != 0 || ip[1] != 0 || ip[2] != 0 || ip[3] != 0)
+ ethernet_get_ipaddress(ipAddress, netmask, gateway);
+ if (!ipAddress.IsNull())
{
// Notify the mDNS responder about this
state = NetworkState::connected;
@@ -478,7 +471,8 @@ void LwipEthernetInterface::Spin(bool full)
{
InitSockets();
RebuildMdnsServices();
- platform.MessageF(NetworkInfoMessage, "Ethernet running, IP address = %s\n", IP4String(ethernet_get_ipaddress()).c_str());
+ ethernet_get_ipaddress(ipAddress, netmask, gateway);
+ platform.MessageF(NetworkInfoMessage, "Ethernet running, IP address = %s\n", IP4String(ipAddress).c_str());
state = NetworkState::active;
}
break;
@@ -595,7 +589,7 @@ bool LwipEthernetInterface::ConnectionEstablished(tcp_pcb *pcb)
IPAddress LwipEthernetInterface::GetIPAddress() const
{
- return IPAddress(ethernet_get_ipaddress());
+ return ipAddress;
}
void LwipEthernetInterface::SetIPAddress(IPAddress p_ipAddress, IPAddress p_netmask, IPAddress p_gateway)
@@ -609,7 +603,7 @@ void LwipEthernetInterface::SetIPAddress(IPAddress p_ipAddress, IPAddress p_netm
if (!usingDhcp)
{
state = NetworkState::obtainingIP;
- uint8_t nullAddress[4] = { 0, 0, 0, 0 };
+ IPAddress nullAddress;
ethernet_set_configuration(nullAddress, nullAddress, nullAddress);
dhcp_start(&gs_net_if);
usingDhcp = true;
@@ -628,11 +622,7 @@ void LwipEthernetInterface::SetIPAddress(IPAddress p_ipAddress, IPAddress p_netm
usingDhcp = false;
}
- uint8_t ipAddress[4], netmask[4], gateway[4];
- p_ipAddress.UnpackV4(ipAddress);
- p_netmask.UnpackV4(netmask);
- p_gateway.UnpackV4(gateway);
- ethernet_set_configuration(ipAddress, netmask, gateway);
+ ethernet_set_configuration(p_ipAddress, p_netmask, p_gateway);
mdns_resp_netif_settings_changed(&gs_net_if);
}
}
diff --git a/src/Networking/LwipEthernet/LwipEthernetInterface.h b/src/Networking/LwipEthernet/LwipEthernetInterface.h
index 974153a9..7eacbc29 100644
--- a/src/Networking/LwipEthernet/LwipEthernetInterface.h
+++ b/src/Networking/LwipEthernet/LwipEthernetInterface.h
@@ -104,6 +104,9 @@ private:
bool initialised;
bool usingDhcp;
+ IPAddress ipAddress;
+ IPAddress netmask;
+ IPAddress gateway;
uint8_t macAddress[6];
};
diff --git a/src/Networking/LwipEthernet/LwipSocket.cpp b/src/Networking/LwipEthernet/LwipSocket.cpp
index 7b236889..786a2db0 100644
--- a/src/Networking/LwipEthernet/LwipSocket.cpp
+++ b/src/Networking/LwipEthernet/LwipSocket.cpp
@@ -87,7 +87,7 @@ bool LwipSocket::AcceptConnection(tcp_pcb *pcb)
whenConnected = millis();
connectionPcb = pcb;
- remoteIPAddress.SetV4(swap32(pcb->remote_ip.addr)); // LWIP IP addresses are big-endian, ours are little endian
+ remoteIPAddress.SetV4LittleEndian(pcb->remote_ip.addr);
remotePort = pcb->remote_port;
tcp_arg(pcb, this);
diff --git a/src/Networking/W5500Ethernet/W5500Interface.cpp b/src/Networking/W5500Ethernet/W5500Interface.cpp
index 89fc3d84..fb8ba382 100644
--- a/src/Networking/W5500Ethernet/W5500Interface.cpp
+++ b/src/Networking/W5500Ethernet/W5500Interface.cpp
@@ -312,7 +312,7 @@ void W5500Interface::Spin(bool full)
if (full && wizphy_getphylink() == PHY_LINK_ON)
{
- usingDhcp = (ipAddress.GetV4() == 0);
+ usingDhcp = ipAddress.IsNull();
if (usingDhcp)
{
// IP address is all zeros, so use DHCP
diff --git a/src/Networking/W5500Ethernet/Wiznet/Ethernet/socketlib.cpp b/src/Networking/W5500Ethernet/Wiznet/Ethernet/socketlib.cpp
index 43a82fc8..37db94de 100644
--- a/src/Networking/W5500Ethernet/Wiznet/Ethernet/socketlib.cpp
+++ b/src/Networking/W5500Ethernet/Wiznet/Ethernet/socketlib.cpp
@@ -109,7 +109,7 @@ int8_t socket(uint8_t sn, uint8_t protocol, uint16_t port, uint8_t flag)
{
IPAddress taddr;
getSIPR(taddr);
- if (taddr.GetV4() == 0)
+ if (taddr.IsNull())
{
return SOCKERR_SOCKINIT;
}
@@ -264,7 +264,7 @@ int32_t sendto(uint8_t sn, const uint8_t * buf, uint16_t len, IPAddress destIp,
}
CHECK_SOCKDATA();
- if (destIp.GetV4() == 0)
+ if (destIp.IsNull())
{
return SOCKERR_IPINVALID;
}
diff --git a/src/Networking/W5500Ethernet/Wiznet/Internet/DHCP/dhcp.cpp b/src/Networking/W5500Ethernet/Wiznet/Internet/DHCP/dhcp.cpp
index 9283d780..f1103a33 100644
--- a/src/Networking/W5500Ethernet/Wiznet/Internet/DHCP/dhcp.cpp
+++ b/src/Networking/W5500Ethernet/Wiznet/Internet/DHCP/dhcp.cpp
@@ -613,7 +613,7 @@ int8_t parseDHCPMSG(void)
case subnetMask :
p++;
p++;
- DHCP_allocated_sn.SetV4(*p);
+ DHCP_allocated_sn.SetV4(p);
p += 4;
break;
case routersOnSubnet :
diff --git a/src/Pccb/Network.h b/src/Pccb/Network.h
index 404ebcd2..586af3f3 100644
--- a/src/Pccb/Network.h
+++ b/src/Pccb/Network.h
@@ -4,10 +4,11 @@
#include "RepRapFirmware.h"
#include "MessageType.h"
#include "GCodes/GCodeResult.h"
+#include "General/IPAddress.h"
-const uint8_t DefaultIpAddress[4] = { 0, 0, 0, 0 };
-const uint8_t DefaultNetMask[4] = { 0, 0, 0, 0 };
-const uint8_t DefaultGateway[4] = { 0, 0, 0, 0 };
+const IPAddress DefaultIpAddress;
+const IPAddress DefaultNetMask;
+const IPAddress DefaultGateway;
const uint8_t macAddress[6] = { 0, 0, 0, 0, 0, 0 };
const uint8_t DefaultMacAddress[6] = { 0, 0, 0, 0, 0, 0 };
@@ -33,7 +34,7 @@ public:
GCodeResult GetNetworkState(unsigned int interface, const StringRef& reply);
- void SetEthernetIPAddress(const uint8_t p_ipAddress[], const uint8_t p_netmask[], const uint8_t p_gateway[]) { }
+ void SetEthernetIPAddress(IPAddress p_ipAddress, IPAddress p_netmask, IPAddress p_gateway) { }
void SetMacAddress(unsigned int interface, const uint8_t mac[]) { }
const uint8_t *GetMacAddress(unsigned int interface) const { return macAddress; }
diff --git a/src/SAME70xpld/Pins_SAME70xpld.h b/src/SAME70xpld/Pins_SAME70xpld.h
index 9434f02e..fa4dcd2a 100644
--- a/src/SAME70xpld/Pins_SAME70xpld.h
+++ b/src/SAME70xpld/Pins_SAME70xpld.h
@@ -29,9 +29,8 @@ const size_t NumFirmwareUpdateModules = 4; // 3 modules, plus one for manual up
// The physical capabilities of the machine
-constexpr size_t DRIVES = 5; // The maximum number of drives supported by the electronics
-constexpr size_t MaxSmartDrivers = 5; // The maximum number of smart drivers
-# define DRIVES_(a,b,c,d,e,f,g,h,i,j,k,l) { a,b,c,d,e }
+constexpr size_t NumDirectDrivers = 5; // The maximum number of drives supported by the electronics
+constexpr size_t MaxTotalDrivers = 5; // The maximum number of smart drivers
constexpr size_t NumEndstops = 5; // The number of inputs we have for endstops, filament sensors etc.
constexpr size_t NumHeaters = 4; // The number of heaters in the machine; 0 is the heated bed even if there isn't one
@@ -43,7 +42,7 @@ constexpr size_t MaxAxes = 9; // The maximum number of movement axes in the
// Initialization macro used in statements needing to initialize values in arrays of size MAX_AXES
#define AXES_(a,b,c,d,e,f,g,h,i) { a,b,c,d,e,f,g,h,i }
-constexpr size_t MaxExtruders = DRIVES - MinAxes; // The maximum number of extruders
+constexpr size_t MaxExtruders = NumDirectDrivers - MinAxes; // The maximum number of extruders
constexpr size_t MaxDriversPerAxis = 5; // The maximum number of stepper drivers assigned to one axis
constexpr size_t NUM_SERIAL_CHANNELS = 2; // The number of serial IO channels not counting the WiFi serial connection (USB and one auxiliary UART)
@@ -58,9 +57,9 @@ constexpr size_t NUM_SERIAL_CHANNELS = 2; // The number of serial IO channels
// DRIVES
-constexpr Pin ENABLE_PINS[DRIVES] = { NoPin, NoPin, NoPin, NoPin, NoPin };
-constexpr Pin STEP_PINS[DRIVES] = { PORTC_PIN(19), PORTC_PIN(19), PORTC_PIN(19), PORTC_PIN(19), PORTC_PIN(19) }; // Do not use NoPin in this list! Code assumes all on port C
-constexpr Pin DIRECTION_PINS[DRIVES] = { NoPin, NoPin, NoPin, NoPin, NoPin };
+constexpr Pin ENABLE_PINS[NumDirectDrivers] = { NoPin, NoPin, NoPin, NoPin, NoPin };
+constexpr Pin STEP_PINS[NumDirectDrivers] = { PORTC_PIN(19), PORTC_PIN(19), PORTC_PIN(19), PORTC_PIN(19), PORTC_PIN(19) }; // Do not use NoPin in this list! Code assumes all on port C
+constexpr Pin DIRECTION_PINS[NumDirectDrivers] = { NoPin, NoPin, NoPin, NoPin, NoPin };
// Endstops
// RepRapFirmware only has a single endstop per axis.
diff --git a/src/Version.h b/src/Version.h
index 0aef939b..2fcda3e6 100644
--- a/src/Version.h
+++ b/src/Version.h
@@ -22,7 +22,7 @@
#endif
#ifndef DATE
-# define DATE "2018-10-16b3"
+# define DATE "2018-10-17b1"
#endif
#define AUTHORS "reprappro, dc42, chrishamm, t3p3, dnewman, printm3d"