parameters: (self, endpoint, data)
docstring: Send a data packet on the given endpoint.
  
      Args:
        endpoint: Endpoint address.
        data: Data buffer.
  
      Raises:
        ValueError: If the endpoint address is not valid.
        RuntimeError: If the device is not connected.
docstring_summary: Send a data packet on the given endpoint.
docstring_tokens: Send a data packet on the given endpoint .
function: def SendPacket(self, endpoint, data):
      """Send a data packet on the given endpoint.
  
      Args:
        endpoint: Endpoint address.
        data: Data buffer.
  
      Raises:
        ValueError: If the endpoint address is not valid.
        RuntimeError: If the device is not connected.
      """
      if self._chip is None:
        raise RuntimeError('Device is not connected.')
      if not endpoint & usb_constants.Dir.IN:
        raise ValueError('Cannot write to non-input endpoint.')
      self._chip.SendPacket(endpoint, data)
function_tokens: def SendPacket ( self , endpoint , data ) : if self . _chip is None : raise RuntimeError ( 'Device is not connected.' ) if not endpoint & usb_constants . Dir . IN : raise ValueError ( 'Cannot write to non-input endpoint.' ) self . _chip . SendPacket ( endpoint , data )