From dc10d7b5413d09ce7ec4710deb109e2357a2ac42 Mon Sep 17 00:00:00 2001 From: Tim Mecklem Date: Sun, 22 Oct 2017 22:36:05 -0400 Subject: [PATCH] Add `:none` to typespec for interrupt direction Using `:none` appears to be the preferred means of unsetting the interrupt callback for a pin, but using it and running `mix dialyzer` on a project results in the following error: | The call 'Elixir.ElixirALE.GPIO':set_int(interrupt_pid@1::any(),'none') | breaks the contract (pid(),int_direction()) -> 'ok' | {'error',term()} --- lib/elixir_ale/gpio.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/elixir_ale/gpio.ex b/lib/elixir_ale/gpio.ex index 3d60914..8fa87cc 100644 --- a/lib/elixir_ale/gpio.ex +++ b/lib/elixir_ale/gpio.ex @@ -12,7 +12,7 @@ defmodule ElixirALE.GPIO do end @type pin_direction :: :input | :output - @type int_direction :: :rising | :falling | :both + @type int_direction :: :rising | :falling | :both | :none # Public API @doc """