anchor.diff:  -export([init/1, handle_event/3, handle_sync_event/4, handle_info/3,
            terminate/3, code_change/4]).
   
  --export([wait_for_hw_version/2, wait_for_dmx/2, wait_for_dmx_change/2]).
  -
  --record(state, {uart, dmxin = none}).
  +-export([wait_for_hw_version/2, get_parameters/2, get_parameters2/2,
  +         wait_for_dmx/2, wait_for_dmx_change/2]).
  +
  +-record(state, {uart, options = #{}, dmxin = none}).
   
   -type enttec_widget_opts() :: #{device => file:filename()}.
   
   -type enttec_packet_type() ::
       assign_ports | change_of_state | flash_page | get_hw_version |
  -    get_parameters | get_serial | receive_dmx_on_change | received_dmx |
  -    reprogram_firmware | send_dmx | send_dmx2 | send_rdm | send_rdm_discovery |
  -    set_parameters.
  +    get_parameters | get_parameters2 | get_serial | receive_dmx_on_change |
  +    received_dmx | reprogram_firmware | send_dmx | send_dmx2 | send_rdm |
  +    send_rdm_discovery | set_parameters | set_parameters2.
   
   -spec start_widget(enttec_widget_opts()) ->
       {ok, pid()} | ignore | {error, term()}.
  
positive.code: -spec encode_packet_data(enttec_packet_type(), term()) ->
      {ok, binary()} | {error, term()}.
  
  encode_packet_data(send_dmx, Data) ->
      {ok, <<0, Data/binary>>};
  encode_packet_data(send_dmx2, Data) ->
      {ok, <<0, Data/binary>>};
  encode_packet_data(assign_ports, {Dunno, Dunno}) ->
      {ok, <<Dunno, Dunno>>};
  
negative.code: 
  -spec get_packet_type(integer()) -> enttec_packet_type() | unknown.
  
  get_packet_type(2)   -> flash_page;
  get_packet_type(3)   -> get_parameters;
  get_packet_type(189) -> get_parameters2;
  get_packet_type(5)   -> received_dmx;
  get_packet_type(9)   -> change_of_state;
  get_packet_type(10)  -> get_serial;
  get_packet_type(14)  -> get_hw_version;
  get_packet_type(_)   -> unknown.
  
  -spec put_packet_type(enttec_packet_type()) -> integer() | unknown.
  
  put_packet_type(reprogram_firmware)    -> 1;
  put_packet_type(flash_page)            -> 2;
  put_packet_type(get_parameters)        -> 3;
  put_packet_type(get_parameters2)       -> 189;
  put_packet_type(set_parameters)        -> 4;
  put_packet_type(set_parameters2)       -> 195;
  put_packet_type(send_dmx)              -> 6;
  put_packet_type(send_rdm)              -> 7;
  put_packet_type(receive_dmx_on_change) -> 8;
  