Skip to content

Commit

Permalink
set_interrupt goto ok, renamed chip_set to chipset in option to gpio_…
Browse files Browse the repository at this point in the history
…server:start_link
  • Loading branch information
tonyrog committed Apr 25, 2013
1 parent 58b4550 commit c247ae5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions c_src/gpio_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,8 +1363,8 @@ static ErlDrvSSizeT gpio_drv_ctl(ErlDrvData d,
goto error;
gp->interrupt = intval;
gp->target = driver_caller(ctx->port);
goto ok;
}
goto ok;
}

case CMD_GET_INTERRUPT: {
Expand All @@ -1387,13 +1387,13 @@ static ErlDrvSSizeT gpio_drv_ctl(ErlDrvData d,
if (len != 1) goto badarg;
gpio_debug_level = get_int8(buf);
DEBUGF("Debug level set to %d", gpio_debug_level);
goto ok;
goto oki;
}

case CMD_DUMP: {
if (len != 0) goto badarg;
dump(ctx);
goto ok;
goto oki;
}

default:
Expand All @@ -1402,6 +1402,7 @@ static ErlDrvSSizeT gpio_drv_ctl(ErlDrvData d,

ok:
DEBUGF("Successfully executed %d on pin %d:%d", cmd, pin_reg, pin);
oki:
return ctl_reply(0, NULL, 0, rbuf, rsize);
badarg:
gpio_errno = EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion src/gpio_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ init(Options) ->
end,

%% Add more chipsets when available
CS = case proplists:get_value(chip_set, Options, false) of
CS = case proplists:get_value(chipset, Options, false) of
false -> "";
bcm2835 -> " b";
Other ->
Expand Down

0 comments on commit c247ae5

Please sign in to comment.