anchor.diff:  -behaviour(gen_server).
   
   %% API
  --export([start_link/0, stop/0, value/1]).
  --export([load_nif/0, init/0, pwm_value/1, pwm_release/0]).
  +-export([start_link/1, stop/1, value/2]).
  +-export([load_nif/0, pwm_init/0, pwm_value/1, pwm_release/0]).
   
   %% gen_server callbacks
   -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
  
positive.code: %%                     {stop, Reason}
  %% @end
  %%--------------------------------------------------------------------
  init([]) ->
      load_nif(),
      init(),
      {ok, []}.
  
  %%--------------------------------------------------------------------
  
negative.code: %% @doc Load the PWM C library.
  %% @end
  -spec(load_nif() -> ok | {error, error_type}).
  load_nif() ->
      ok = erlang:load_nif(?NIF_PWM_LIB, 0).
  
  %% @doc Initialise the PWM peripheral.
  %% @end
  -spec(pwm_init() -> ok | {error,pwm_initialization_error}).
  pwm_init() ->
      exit({error, pwm_initialization_error}).
  
  %% @doc Set PWM value.
  