   See [tcflush(3)](http://linux.die.net/man/3/tcflush) for low level details on
   Linux or OSX. This calls `PurgeComm` on Windows.
   """
-  @spec flush(pid) :: :ok | {:error, term}
+  @spec flush(GenServer.server) :: :ok | {:error, term}
   def flush(pid, direction \\ :both) do
     GenServer.call(pid, {:flush, direction})
   end

  This is a convenience function for calling `set_break/2` to enable
  the break signal, wait, and then turn it off.
  """
  @spec send_break(pid, integer) :: :ok | {:error, term}
  def send_break(pid, duration \\ 250) do
    :ok = set_break(pid, true)
    :timer.sleep(duration)

  @doc """
  Start or stop sending a break signal.
  """
  @spec set_break(GenServer.server, boolean) :: :ok | {:error, term}
  def set_break(pid, value) when is_boolean(value) do
    GenServer.call(pid, {:set_break, value})
  end
