Skip to content

Commit

Permalink
firmware: Fixing cas when only parts are defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
mithro committed Mar 4, 2017
1 parent dd1d8af commit b8412a2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion firmware/ci.c
Expand Up @@ -1260,13 +1260,19 @@ void ci_service(void)
#ifdef CSR_CAS_BASE
} else if(strcmp(token, "cas") == 0) {
token = get_token(&str);
if(strcmp(token, "leds") == 0) {
if (false) { }
#ifdef CSR_CAS_LEDS_OUT_ADDR
else if(strcmp(token, "leds") == 0) {
token = get_token(&str);
cas_leds_out_write(atoi(token));
}
#endif
#ifdef CSR_CAS_SWITCHES_IN_ADDR
else if(strcmp(token, "switches") == 0) {
wprintf("%X\r\n", (int)cas_switches_in_read());
}
#endif
#ifdef CSR_CAS_BUTTONS_EV_STATUS_ADDR
else if(strcmp(token, "buttons") == 0) {
int status = cas_buttons_ev_status_read();
int pending = cas_buttons_ev_pending_read();
Expand All @@ -1276,6 +1282,7 @@ void ci_service(void)
cas_buttons_ev_pending_write(pending);
}
}
#endif
#endif
} else
help_debug();
Expand Down

0 comments on commit b8412a2

Please sign in to comment.