code: def write_data(self, buf):
          
          data = ''.join(map(chr, buf))
          size = len(data)
          if hidapi.hid_write(self.device, ctypes.c_char_p(data), size) != size:
              raise IOError(
                  'pywws.device_ctypes_hidapi.USBDevice.write_data failed')
          return True
docs: Send data to the device.
  
          :param buf: the data to send.
  
          :type buf: list(int)
  
          :return: success status.
  
          :rtype: bool