diff options
| author | Bdale Garbee <bdale@gag.com> | 2019-01-02 22:23:04 -0700 |
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2019-01-02 22:23:04 -0700 |
| commit | b340cbf1403a5f5b181a215935f713a50da8e5e4 (patch) | |
| tree | 8c0d2afbe8168c29584e0d568b80353fdf555883 /src/usbrelay-v0.1/ao_usbrelay.c | |
| parent | 1da4b57545233f2f2afd350bd8aed4ef7bb0c844 (diff) | |
| parent | 95ffec073b0758801df04a77eca0bd2bc6e57e35 (diff) | |
Merge branch 'branch-1.9' into debian
Diffstat (limited to 'src/usbrelay-v0.1/ao_usbrelay.c')
| -rw-r--r-- | src/usbrelay-v0.1/ao_usbrelay.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/usbrelay-v0.1/ao_usbrelay.c b/src/usbrelay-v0.1/ao_usbrelay.c index d908f4db..946f4b12 100644 --- a/src/usbrelay-v0.1/ao_usbrelay.c +++ b/src/usbrelay-v0.1/ao_usbrelay.c @@ -45,21 +45,20 @@ ao_relay_control(uint8_t output) } static void -ao_relay_select(void) __reentrant +ao_relay_select(void) { uint8_t output; - ao_cmd_decimal(); + output = ao_cmd_decimal(); if (ao_cmd_status != ao_cmd_success) return; - output = ao_cmd_lex_i; if (output > 1) printf ("Invalid relay position %u\n", output); else ao_relay_control(output); } -static __code struct ao_cmds ao_relay_cmds[] = { +static const struct ao_cmds ao_relay_cmds[] = { { ao_relay_select, "R <output>\0Select relay output" }, { 0, NULL } }; |
