diff --git a/wpilibc/src/main/native/cpp/SPI.cpp b/wpilibc/src/main/native/cpp/SPI.cpp index 29cd00635e..26e26b71e6 100644 --- a/wpilibc/src/main/native/cpp/SPI.cpp +++ b/wpilibc/src/main/native/cpp/SPI.cpp @@ -177,44 +177,6 @@ void SPI::SetClockRate(int hz) { HAL_SetSPISpeed(m_port, hz); } -void SPI::SetMSBFirst() { - FRC_ReportError(1, "SetMSBFirst not supported by roboRIO {}", - static_cast(m_port)); -} - -void SPI::SetLSBFirst() { - FRC_ReportError(1, "SetLSBFirst not supported by roboRIO {}", - static_cast(m_port)); -} - -void SPI::SetSampleDataOnLeadingEdge() { - int mode = m_mode; - mode &= 2; - m_mode = static_cast(mode); - HAL_SetSPIMode(m_port, m_mode); -} - -void SPI::SetSampleDataOnTrailingEdge() { - int mode = m_mode; - mode |= 2; - m_mode = static_cast(mode); - HAL_SetSPIMode(m_port, m_mode); -} - -void SPI::SetClockActiveLow() { - int mode = m_mode; - mode |= 1; - m_mode = static_cast(mode); - HAL_SetSPIMode(m_port, m_mode); -} - -void SPI::SetClockActiveHigh() { - int mode = m_mode; - mode &= 1; - m_mode = static_cast(mode); - HAL_SetSPIMode(m_port, m_mode); -} - void SPI::SetMode(Mode mode) { m_mode = static_cast(mode & 0x3); HAL_SetSPIMode(m_port, m_mode); diff --git a/wpilibc/src/main/native/include/frc/SPI.h b/wpilibc/src/main/native/include/frc/SPI.h index 153c98b794..1158cbdea2 100644 --- a/wpilibc/src/main/native/include/frc/SPI.h +++ b/wpilibc/src/main/native/include/frc/SPI.h @@ -11,7 +11,6 @@ #include #include -#include namespace frc { @@ -60,60 +59,6 @@ class SPI { */ void SetClockRate(int hz); - /** - * Configure the order that bits are sent and received on the wire - * to be most significant bit first. - * - * @deprecated Does not work, will be removed. - */ - WPI_DEPRECATED("Not supported by roboRIO.") - void SetMSBFirst(); - - /** - * Configure the order that bits are sent and received on the wire - * to be least significant bit first. - * - * @deprecated Does not work, will be removed. - */ - WPI_DEPRECATED("Not supported by roboRIO.") - void SetLSBFirst(); - - /** - * Configure that the data is stable on the leading edge and the data - * changes on the trailing edge. - * - * @deprecated Use SetMode() instead. - */ - WPI_DEPRECATED("Use SetMode() instead") - void SetSampleDataOnLeadingEdge(); - - /** - * Configure that the data is stable on the trailing edge and the data - * changes on the leading edge. - * - * @deprecated Use SetMode() instead. - */ - WPI_DEPRECATED("Use SetMode() instead") - void SetSampleDataOnTrailingEdge(); - - /** - * Configure the clock output line to be active low. - * This is sometimes called clock polarity high or clock idle high. - * - * @deprecated Use SetMode() instead. - */ - WPI_DEPRECATED("Use SetMode() instead") - void SetClockActiveLow(); - - /** - * Configure the clock output line to be active high. - * This is sometimes called clock polarity low or clock idle low. - * - * @deprecated Use SetMode() instead. - */ - WPI_DEPRECATED("Use SetMode() instead") - void SetClockActiveHigh(); - /** * Sets the mode for the SPI device. * diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SPI.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/SPI.java index 489ed832cd..632770c80d 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SPI.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/SPI.java @@ -87,76 +87,6 @@ public class SPI implements AutoCloseable { SPIJNI.spiSetSpeed(m_port, hz); } - /** - * Configure the order that bits are sent and received on the wire to be the most significant bit - * first. - * - * @deprecated Does not work, will be removed. - */ - @Deprecated(since = "2023", forRemoval = true) - public final void setMSBFirst() { - DriverStation.reportWarning("setMSBFirst not supported by roboRIO", false); - } - - /** - * Configure the order that bits are sent and received on the wire to be the least significant bit - * first. - * - * @deprecated Does not work, will be removed. - */ - @Deprecated(since = "2023", forRemoval = true) - public final void setLSBFirst() { - DriverStation.reportWarning("setLSBFirst not supported by roboRIO", false); - } - - /** - * Configure the clock output line to be active low. This is sometimes called clock polarity high - * or clock idle high. - * - * @deprecated Use setMode() instead. - */ - @Deprecated(since = "2023", forRemoval = true) - public final void setClockActiveLow() { - m_mode |= 1; - SPIJNI.spiSetMode(m_port, m_mode); - } - - /** - * Configure the clock output line to be active high. This is sometimes called clock polarity low - * or clock idle low. - * - * @deprecated Use setMode() instead. - */ - @Deprecated(since = "2023", forRemoval = true) - public final void setClockActiveHigh() { - m_mode &= 1; - SPIJNI.spiSetMode(m_port, m_mode); - } - - /** - * Configure that the data is stable on the leading edge and the data changes on the trailing - * edge. - * - * @deprecated Use setMode() instead. - */ - @Deprecated(since = "2023", forRemoval = true) - public final void setSampleDataOnLeadingEdge() { - m_mode &= 2; - SPIJNI.spiSetMode(m_port, m_mode); - } - - /** - * Configure that the data is stable on the trailing edge and the data changes on the leading - * edge. - * - * @deprecated Use setMode() instead. - */ - @Deprecated(since = "2023", forRemoval = true) - public final void setSampleDataOnTrailingEdge() { - m_mode |= 2; - SPIJNI.spiSetMode(m_port, m_mode); - } - /** * Sets the mode for the SPI device. *