8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcc531f commit 3c7a2d5Copy full SHA for 3c7a2d5
libraries/SPI/SPI.cpp
@@ -458,6 +458,12 @@ void SPIClass::waitForTransfer(void) {
458
while(dma_busy);
459
}
460
461
+/* returns the current DMA transfer status to allow non-blocking polling */
462
+bool SPIClass::isBusy(void) {
463
+ return dma_busy;
464
+}
465
+
466
467
// End DMA-based SPI transfer() code ---------------------------------------
468
469
void SPIClass::attachInterrupt() {
libraries/SPI/SPI.h
@@ -120,6 +120,7 @@ class SPIClass {
120
void transfer(const void* txbuf, void* rxbuf, size_t count,
121
bool block = true);
122
void waitForTransfer(void);
123
+ bool isBusy(void);
124
125
// Transaction Functions
126
void usingInterrupt(int interruptNumber);
0 commit comments