Skip to content

Commit

Permalink
Update signal table initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Nov 29, 2023
1 parent 8159b6f commit ea16539
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
18 changes: 4 additions & 14 deletions cpp/buses/gpiobus_raspberry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,7 @@ void GPIOBUS_Raspberry::Reset()
SetControl(PIN_ACT, false);

// Set all signals to off
for (int i = 0;; i++) {
const int signal = SignalTable[i];
if (signal < 0) {
break;
}

for (const int signal : SignalTable) {
SetSignal(signal, false);
}

Expand Down Expand Up @@ -579,14 +574,9 @@ void GPIOBUS_Raspberry::SetDAT(uint8_t dat)
#endif
}

//---------------------------------------------------------------------------
//
// Signal table
//
//---------------------------------------------------------------------------
const array<int, 19> GPIOBUS_Raspberry::SignalTable = {PIN_DT0, PIN_DT1, PIN_DT2, PIN_DT3, PIN_DT4, PIN_DT5, PIN_DT6,
PIN_DT7, PIN_DP, PIN_SEL, PIN_ATN, PIN_RST, PIN_ACK, PIN_BSY,
PIN_MSG, PIN_CD, PIN_IO, PIN_REQ, -1};
const array<int, 19> GPIOBUS_Raspberry::SignalTable = { PIN_DT0, PIN_DT1, PIN_DT2, PIN_DT3, PIN_DT4, PIN_DT5, PIN_DT6,
PIN_DT7, PIN_DP, PIN_SEL, PIN_ATN, PIN_RST, PIN_ACK, PIN_BSY,
PIN_MSG, PIN_CD, PIN_IO, PIN_REQ };

//---------------------------------------------------------------------------
//
Expand Down
4 changes: 0 additions & 4 deletions cpp/buses/gpiobus_raspberry.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ const static int GICD_ICFGR0 = 0x300;
const static int GICD_SGIR = 0x3C0;
const static int GICC_CTLR = 0x000;
const static int GICC_PMR = 0x001;
const static int GICC_IAR = 0x003;
const static int GICC_EOIR = 0x004;

// Constant declarations (GIC IRQ)
const static int GIC_IRQLOCAL0 = (16 + 14);
// GPIO3
const static int GIC_GPIO_IRQ = (32 + 116);

Expand Down

0 comments on commit ea16539

Please sign in to comment.