def send_spi_frame(self, ctrl_data): pa_spi_frame = packet_assembler() spi_frame_cv = pa_spi_frame.assemble_spi_frame(ctrl_data) #Send SPI-Frame Controlled Value from Matlab Controller for index in range(0, len(spi_frame_cv)): self.spi_device.cshigh = True self.spi_device.writebytes([spi_frame_cv[index]]) resp = self.spi_device.readbytes(1) self.spi_device.cshigh = False return
def send_spi_frame(self): ctrl_proc = Controller_Processing() ctrl_param = ctrl_proc.get_controlled_param() pa_spi_frame = packet_assembler() spi_frame_cv = pa_spi_frame.assemble_spi_frame(ctrl_param) #Send SPI-Frame Controlled Value from Matlab Controller for index in range(0, len(spi_frame_cv)): self.spi_device.cshigh = True self.spi_device.writebytes([spi_frame_cv[index]]) resp = self.spi_device.readbytes(1) self.spi_device.cshigh = False return
def send_SPI_config(self, spi_config): packetAssembler = packet_assembler() packetSPIconfig = packetAssembler.assemblePacketSPIconfig(spi_config) return self.packet_transmission(packetSPIconfig, True)
def device_detection(self): packetAssembler = packet_assembler() packetComInt = packetAssembler.assemblePacketComInit() return self.packet_transmission(packetComInt, False)