示例#1
0
static int
prepareUsbEndpoint (GioEndpoint *endpoint) {
  GioHandle *handle = endpoint->handle;
  UsbChannel *channel = handle->channel;

  if (!endpoint->options.applicationData) {
    endpoint->options.applicationData = handle->properties.applicationData;
  }

  {
    const SerialParameters *parameters = channel->definition.serial;

    if (parameters) {
      gioSetBytesPerSecond(endpoint, parameters);
    }
  }

  return 1;
}
示例#2
0
static int
prepareSerialEndpoint (GioEndpoint *endpoint) {
  gioSetBytesPerSecond(endpoint, &endpoint->handle->parameters);
  return 1;
}