@@ -707,12 +707,12 @@ def reset(self):
707
707
708
708
return self .sendCommand ("Z" )
709
709
710
- def i2cSendBin (self , slaveAddr , buff ):
710
+ def i2cSendBin (self , subordinateAddr , buff ):
711
711
"""
712
712
Sends a one-way message (provided as a a binary buffer) to a device on the I2C bus.
713
713
This function checks and reports communication errors on the I2C bus.
714
714
715
- @param slaveAddr : the 7-bit address of the slave device (without the direction bit)
715
+ @param subordinateAddr : the 7-bit address of the subordinate device (without the direction bit)
716
716
@param buff : the binary buffer to be sent
717
717
718
718
@return YAPI.SUCCESS if the call succeeds.
@@ -724,7 +724,7 @@ def i2cSendBin(self, slaveAddr, buff):
724
724
# val
725
725
# msg
726
726
# reply
727
- msg = "@" + ("%02x" % slaveAddr ) + ":"
727
+ msg = "@" + ("%02x" % subordinateAddr ) + ":"
728
728
nBytes = len (buff )
729
729
idx = 0
730
730
while idx < nBytes :
@@ -746,12 +746,12 @@ def i2cSendBin(self, slaveAddr, buff):
746
746
return YAPI .IO_ERROR
747
747
return YAPI .SUCCESS
748
748
749
- def i2cSendArray (self , slaveAddr , values ):
749
+ def i2cSendArray (self , subordinateAddr , values ):
750
750
"""
751
751
Sends a one-way message (provided as a list of integer) to a device on the I2C bus.
752
752
This function checks and reports communication errors on the I2C bus.
753
753
754
- @param slaveAddr : the 7-bit address of the slave device (without the direction bit)
754
+ @param subordinateAddr : the 7-bit address of the subordinate device (without the direction bit)
755
755
@param values : a list of data bytes to be sent
756
756
757
757
@return YAPI.SUCCESS if the call succeeds.
@@ -763,7 +763,7 @@ def i2cSendArray(self, slaveAddr, values):
763
763
# val
764
764
# msg
765
765
# reply
766
- msg = "@" + ("%02x" % slaveAddr ) + ":"
766
+ msg = "@" + ("%02x" % subordinateAddr ) + ":"
767
767
nBytes = len (values )
768
768
idx = 0
769
769
while idx < nBytes :
@@ -785,17 +785,17 @@ def i2cSendArray(self, slaveAddr, values):
785
785
return YAPI .IO_ERROR
786
786
return YAPI .SUCCESS
787
787
788
- def i2cSendAndReceiveBin (self , slaveAddr , buff , rcvCount ):
788
+ def i2cSendAndReceiveBin (self , subordinateAddr , buff , rcvCount ):
789
789
"""
790
790
Sends a one-way message (provided as a a binary buffer) to a device on the I2C bus,
791
791
then read back the specified number of bytes from device.
792
792
This function checks and reports communication errors on the I2C bus.
793
793
794
- @param slaveAddr : the 7-bit address of the slave device (without the direction bit)
794
+ @param subordinateAddr : the 7-bit address of the subordinate device (without the direction bit)
795
795
@param buff : the binary buffer to be sent
796
796
@param rcvCount : the number of bytes to receive once the data bytes are sent
797
797
798
- @return a list of bytes with the data received from slave device.
798
+ @return a list of bytes with the data received from subordinate device.
799
799
800
800
On failure, throws an exception or returns an empty binary buffer.
801
801
"""
@@ -805,7 +805,7 @@ def i2cSendAndReceiveBin(self, slaveAddr, buff, rcvCount):
805
805
# msg
806
806
# reply
807
807
# rcvbytes
808
- msg = "@" + ("%02x" % slaveAddr ) + ":"
808
+ msg = "@" + ("%02x" % subordinateAddr ) + ":"
809
809
nBytes = len (buff )
810
810
idx = 0
811
811
while idx < nBytes :
@@ -834,17 +834,17 @@ def i2cSendAndReceiveBin(self, slaveAddr, buff, rcvCount):
834
834
rcvbytes = YAPI ._hexStrToBin (reply )
835
835
return rcvbytes
836
836
837
- def i2cSendAndReceiveArray (self , slaveAddr , values , rcvCount ):
837
+ def i2cSendAndReceiveArray (self , subordinateAddr , values , rcvCount ):
838
838
"""
839
839
Sends a one-way message (provided as a list of integer) to a device on the I2C bus,
840
840
then read back the specified number of bytes from device.
841
841
This function checks and reports communication errors on the I2C bus.
842
842
843
- @param slaveAddr : the 7-bit address of the slave device (without the direction bit)
843
+ @param subordinateAddr : the 7-bit address of the subordinate device (without the direction bit)
844
844
@param values : a list of data bytes to be sent
845
845
@param rcvCount : the number of bytes to receive once the data bytes are sent
846
846
847
- @return a list of bytes with the data received from slave device.
847
+ @return a list of bytes with the data received from subordinate device.
848
848
849
849
On failure, throws an exception or returns an empty array.
850
850
"""
@@ -855,7 +855,7 @@ def i2cSendAndReceiveArray(self, slaveAddr, values, rcvCount):
855
855
# reply
856
856
# rcvbytes
857
857
res = []
858
- msg = "@" + ("%02x" % slaveAddr ) + ":"
858
+ msg = "@" + ("%02x" % subordinateAddr ) + ":"
859
859
nBytes = len (values )
860
860
idx = 0
861
861
while idx < nBytes :
0 commit comments