   @doc """
   Starts Bluetooth discovery
   """
+  @spec stop_discovery(pid) :: :ok
   def stop_discovery(pid) do
     GenServer.cast(pid, :stop_discovery)
   end

  @doc """
  Starts Bluetooth discovery
  """
  def start_discovery(pid) do
    GenServer.cast(pid, :start_discovery)
  end

  @doc """
  Gets list of devices
  """
  @spec get_devices(pid) :: list(%Bluex.Device{})
  def get_devices(pid) do
    GenServer.call(pid, :get_devices)
  end

  @doc false
  @spec device_found(pid, %Bluex.Device{}) :: :ok
  def device_found(pid, device) do
    GenServer.cast(pid, {:device_found, device})
  end
