mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Add support for configuring SPI Auto Stall Config (#2193)
This commit is contained in:
committed by
Peter Johnson
parent
3259cffc63
commit
bdc1cab013
@@ -424,6 +424,17 @@ public class SPI implements AutoCloseable {
|
||||
return SPIJNI.spiGetAutoDroppedCount(m_port);
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the Auto SPI Stall time between reads.
|
||||
*
|
||||
* @param csToSclkTicks the number of ticks to wait before asserting the cs pin
|
||||
* @param stallTicks the number of ticks to stall for
|
||||
* @param pow2BytesPerRead the number of bytes to read before stalling
|
||||
*/
|
||||
public void configureAutoStall(int csToSclkTicks, int stallTicks, int pow2BytesPerRead) {
|
||||
SPIJNI.spiConfigureAutoStall(m_port, csToSclkTicks, stallTicks, pow2BytesPerRead);
|
||||
}
|
||||
|
||||
private static final int kAccumulateDepth = 2048;
|
||||
|
||||
@SuppressWarnings("PMD.TooManyFields")
|
||||
|
||||
Reference in New Issue
Block a user