pub fn read(&mut self, motor_id: u8, address: u16, count: u16) -> Result<ReadResponse<ReadBuffer, WriteBuffer>, TransferError> {
		let response = self.transfer_single(motor_id, instruction_id::READ, 4, |buffer| {
			write_u16_le(&mut buffer[0..], address);
			write_u16_le(&mut buffer[2..], count);
		})?;
		crate::error::InvalidParameterCount::check(response.parameters().len(), count.into()).map_err(crate::ReadError::from)?;
		Ok(ReadResponse { response })
	}
/// Read an arbitrary number of bytes from a specific motor.
///
/// This function will not work correctly if the motor ID is set to [`packet_id::BROADCAST`][crate::instructions::packet_id::BROADCAST].
/// Use [`Self::sync_read`] to read from multiple motors with one command.
Read an arbitrary number of bytes from a specific motor.
Read an arbitrary number of bytes from a specific motor .
pub fn read(&mut self, motor_id: u8, address: u16, count: u16) -> Result<ReadResponse<ReadBuffer, WriteBuffer>, TransferError> {
		let response = self.transfer_single(motor_id, instruction_id::READ, 4, |buffer| {
			write_u16_le(&mut buffer[0..], address);
			write_u16_le(&mut buffer[2..], count);
		})?;
		crate::error::InvalidParameterCount::check(response.parameters().len(), count.into()).map_err(crate::ReadError::from)?;
		Ok(ReadResponse { response })
	}
pub fn read ( & mut self , motor_id : u8 , address : u16 , count : u16 ) -> Result < ReadResponse < ReadBuffer , WriteBuffer > , TransferError > { let response = self . transfer_single ( motor_id , instruction_id :: READ , 4 , | buffer | { write_u16_le ( & mut buffer [ 0 .. ] , address ) ; write_u16_le ( & mut buffer [ 2 .. ] , count ) ; } ) ? ; crate :: error :: InvalidParameterCount :: check ( response . parameters ( ) . len ( ) , count . into ( ) ) . map_err ( crate :: ReadError :: from ) ? ; Ok ( ReadResponse { response } ) }
Read an arbitrary number of bytes from a specific motor.
Read an arbitrary number of bytes from a specific motor .
&mut self
motor_id
u8
address
u16
count
u16
&mut self
motor_id
u8
address
u16
count
u16