mirror of https://gerrit.osmocom.org/simtrace2
firmware: octsimtest: Fix disabling the card_insert signal
Back in I8c9b0c3d862a967832134b24252577739182da62 we added support for enabling the card_insert signal, but not for explicit disable of it. Let's fix that. Change-Id: I6f32bde60674119c9912e51059a53b5ee74d074a
This commit is contained in:
parent
e2971dee2a
commit
2b1d1e6d92
|
@ -103,8 +103,13 @@ void board_set_card_insert(struct cardem_inst *ci, bool card_insert)
|
|||
* the sim-present signal of the respective slot */
|
||||
|
||||
if (mcp2317_present) {
|
||||
/* we must enable card-presence of the active slot and disable it on all others */
|
||||
mcp23017_set_output_a(MCP23017_ADDRESS, (1 << s));
|
||||
if (card_insert) {
|
||||
/* we must enable card-presence of the active slot and disable it on all others */
|
||||
mcp23017_set_output_a(MCP23017_ADDRESS, (1 << s));
|
||||
} else {
|
||||
/* we disable all card insert signals */
|
||||
mcp23017_set_output_a(MCP23017_ADDRESS, 0);
|
||||
}
|
||||
} else {
|
||||
TRACE_WARNING("No MCP23017 present; cannot set CARD_INSERT\r\n");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue