mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-25 05:32:20 +00:00
Fix BSY pin handling in initiator mode (#1312)
* In initiator mode configure BSY as an output pin when BSY is set
This commit is contained in:
parent
c59a300a97
commit
23e5286267
@ -410,32 +410,30 @@ void GPIOBUS_Raspberry::SetBSY(bool ast)
|
|||||||
// Set BSY signal
|
// Set BSY signal
|
||||||
SetSignal(PIN_BSY, ast);
|
SetSignal(PIN_BSY, ast);
|
||||||
|
|
||||||
if (actmode == mode_e::TARGET) {
|
if (ast) {
|
||||||
if (ast) {
|
// Turn on ACTIVE signal
|
||||||
// Turn on ACTIVE signal
|
SetControl(PIN_ACT, ACT_ON);
|
||||||
SetControl(PIN_ACT, ACT_ON);
|
|
||||||
|
|
||||||
// Set Target signal to output
|
// Set Target signal to output
|
||||||
SetControl(PIN_TAD, TAD_OUT);
|
SetControl(PIN_TAD, TAD_OUT);
|
||||||
|
|
||||||
SetMode(PIN_BSY, OUT);
|
SetMode(PIN_BSY, OUT);
|
||||||
SetMode(PIN_MSG, OUT);
|
SetMode(PIN_MSG, OUT);
|
||||||
SetMode(PIN_CD, OUT);
|
SetMode(PIN_CD, OUT);
|
||||||
SetMode(PIN_REQ, OUT);
|
SetMode(PIN_REQ, OUT);
|
||||||
SetMode(PIN_IO, OUT);
|
SetMode(PIN_IO, OUT);
|
||||||
} else {
|
} else {
|
||||||
// Turn off the ACTIVE signal
|
// Turn off the ACTIVE signal
|
||||||
SetControl(PIN_ACT, ACT_OFF);
|
SetControl(PIN_ACT, ACT_OFF);
|
||||||
|
|
||||||
// Set the target signal to input
|
// Set the target signal to input
|
||||||
SetControl(PIN_TAD, TAD_IN);
|
SetControl(PIN_TAD, TAD_IN);
|
||||||
|
|
||||||
SetMode(PIN_BSY, IN);
|
SetMode(PIN_BSY, IN);
|
||||||
SetMode(PIN_MSG, IN);
|
SetMode(PIN_MSG, IN);
|
||||||
SetMode(PIN_CD, IN);
|
SetMode(PIN_CD, IN);
|
||||||
SetMode(PIN_REQ, IN);
|
SetMode(PIN_REQ, IN);
|
||||||
SetMode(PIN_IO, IN);
|
SetMode(PIN_IO, IN);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user