anchor.diff:  %%% @author Ivan Iacono <ivan.iacono@erlang-solutions.com> - Erlang Solutions Ltd
   %%% @copyright (C) 2013, Erlang Solutions Ltd
  -%%% @doc This module allow to use erlang/ALE to generate PWM signals.
  +%%% @doc This is the implementation of the PWM interface module.
  +%%% There is one process for each pwm device. Each process is liked to the supervisor
  +%%% of the pwm application.
   %%% @end
   
   -module(pwm).
  
positive.code: -define(SERVER, ?MODULE).
  -define(NIF_PWM_LIB, "../priv/pwm_nif").
  
  start_link() ->
      gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
  
  stop() ->
      gen_server:cast(?SERVER, stop).
  
  value(X) -> 
      gen_server:call(?SERVER, {call, value, X}).
  
  %%%===================================================================
  %%% gen_server callbacks
  
negative.code: %%                     {stop, Reason}
  %% @end
  %%--------------------------------------------------------------------
  init(Devname) ->
      load_nif(),
      pwm_init(),
      {ok, []}.
  
  %%--------------------------------------------------------------------
  