diff --git a/cpp/buses/rpi_bus.cpp b/cpp/buses/rpi_bus.cpp index 0fff0deb..d0feac48 100644 --- a/cpp/buses/rpi_bus.cpp +++ b/cpp/buses/rpi_bus.cpp @@ -253,6 +253,7 @@ void RpiBus::Reset() SetMode(PIN_DT5, IN); SetMode(PIN_DT6, IN); SetMode(PIN_DT7, IN); + SetMode(PIN_DP, IN); } else { // Set the initiator signal to output SetControl(PIN_IND, IND_OUT); @@ -271,6 +272,7 @@ void RpiBus::Reset() SetMode(PIN_DT5, OUT); SetMode(PIN_DT6, OUT); SetMode(PIN_DT7, OUT); + SetMode(PIN_DP, OUT); } // Initialize all signals @@ -416,6 +418,7 @@ bool RpiBus::GetIO() SetMode(PIN_DT5, IN); SetMode(PIN_DT6, IN); SetMode(PIN_DT7, IN); + SetMode(PIN_DP, IN); } else { SetControl(PIN_DTD, DTD_OUT); SetMode(PIN_DT0, OUT); @@ -426,6 +429,7 @@ bool RpiBus::GetIO() SetMode(PIN_DT5, OUT); SetMode(PIN_DT6, OUT); SetMode(PIN_DT7, OUT); + SetMode(PIN_DP, OUT); } } @@ -450,6 +454,7 @@ void RpiBus::SetIO(bool state) SetMode(PIN_DT5, OUT); SetMode(PIN_DT6, OUT); SetMode(PIN_DT7, OUT); + SetMode(PIN_DP, OUT); } else { SetControl(PIN_DTD, DTD_IN); SetMode(PIN_DT0, IN); @@ -460,6 +465,7 @@ void RpiBus::SetIO(bool state) SetMode(PIN_DT5, IN); SetMode(PIN_DT6, IN); SetMode(PIN_DT7, IN); + SetMode(PIN_DP, IN); } } @@ -475,18 +481,31 @@ void RpiBus::SetREQ(bool state) inline uint8_t RpiBus::GetDAT() { +#if !defined BOARD_STANDARD && !defined BOARD_FULLSPEC + uint32_t data = Acquire(); + data = ((data >> (PIN_DT0 - 0)) & (1 << 0)) | ((data >> (PIN_DT1 - 1)) & (1 << 1)) | + ((data >> (PIN_DT2 - 2)) & (1 << 2)) | ((data >> (PIN_DT3 - 3)) & (1 << 3)) | + ((data >> (PIN_DT4 - 4)) & (1 << 4)) | ((data >> (PIN_DT5 - 5)) & (1 << 5)) | + ((data >> (PIN_DT6 - 6)) & (1 << 6)) | ((data >> (PIN_DT7 - 7)) & (1 << 7)); + + return (uint8_t)data; +#else return static_cast(Acquire() >> PIN_DT0); +#endif } void RpiBus::SetDAT(uint8_t dat) { // Write to port #if SIGNAL_CONTROL_MODE == 0 - uint32_t fsel = gpfsel[0]; + uint32_t fsel; +#if !defined BOARD_STANDARD && !defined BOARD_FULLSPEC + fsel = gpfsel[0]; fsel &= tblDatMsk[0][dat]; fsel |= tblDatSet[0][dat]; gpfsel[0] = fsel; gpio[GPIO_FSEL_0] = fsel; +#endif fsel = gpfsel[1]; fsel &= tblDatMsk[1][dat]; @@ -494,11 +513,13 @@ void RpiBus::SetDAT(uint8_t dat) gpfsel[1] = fsel; gpio[GPIO_FSEL_1] = fsel; +#if !defined BOARD_STANDARD && !defined BOARD_FULLSPEC fsel = gpfsel[2]; fsel &= tblDatMsk[2][dat]; fsel |= tblDatSet[2][dat]; gpfsel[2] = fsel; gpio[GPIO_FSEL_2] = fsel; +#endif #else gpio[GPIO_CLR_0] = tblDatMsk[dat]; gpio[GPIO_SET_0] = tblDatSet[dat]; diff --git a/cpp/shared/s2p_version.cpp b/cpp/shared/s2p_version.cpp index b8c1ad39..a80c906e 100644 --- a/cpp/shared/s2p_version.cpp +++ b/cpp/shared/s2p_version.cpp @@ -10,5 +10,5 @@ const int s2p_major_version = 3; const int s2p_minor_version = 0; -const int s2p_revision = 1; +const int s2p_revision = 2; const std::string s2p_suffix = "";