tool/MasterDevice.cpp
changeset 1388 3c886ec376f5
parent 1363 11c0b2caa253
child 1485 5ddc3a455059
--- a/tool/MasterDevice.cpp	Wed Apr 08 12:10:01 2009 +0000
+++ b/tool/MasterDevice.cpp	Wed Apr 08 12:48:59 2009 +0000
@@ -369,26 +369,26 @@
 
 /****************************************************************************/
 
-void MasterDevice::readPhy(
-        ec_ioctl_slave_phy_t *data
-        )
-{
-    if (ioctl(fd, EC_IOCTL_SLAVE_PHY_READ, data) < 0) {
-        stringstream err;
-        err << "Failed to read physical memory: " << strerror(errno);
-        throw MasterDeviceException(err);
-    }
-}
-
-/****************************************************************************/
-
-void MasterDevice::writePhy(
-        ec_ioctl_slave_phy_t *data
-        )
-{
-    if (ioctl(fd, EC_IOCTL_SLAVE_PHY_WRITE, data) < 0) {
-        stringstream err;
-        err << "Failed to write physical memory: " << strerror(errno);
+void MasterDevice::readReg(
+        ec_ioctl_slave_reg_t *data
+        )
+{
+    if (ioctl(fd, EC_IOCTL_SLAVE_REG_READ, data) < 0) {
+        stringstream err;
+        err << "Failed to read register: " << strerror(errno);
+        throw MasterDeviceException(err);
+    }
+}
+
+/****************************************************************************/
+
+void MasterDevice::writeReg(
+        ec_ioctl_slave_reg_t *data
+        )
+{
+    if (ioctl(fd, EC_IOCTL_SLAVE_REG_WRITE, data) < 0) {
+        stringstream err;
+        err << "Failed to write register: " << strerror(errno);
         throw MasterDeviceException(err);
     }
 }