File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1171,6 +1171,19 @@ void Adafruit_SPITFT::dmaWait(void) {
1171
1171
#endif
1172
1172
}
1173
1173
1174
+ /* !
1175
+ @brief Check if DMA transfer is active. Always returts false if DMA
1176
+ is not enabled.
1177
+ @return true if DMA is enabled and transmitting data, false otherwise.
1178
+ */
1179
+ bool Adafruit_SPITFT::dmaBusy (void ) const {
1180
+ #if defined(USE_SPI_DMA) && (defined(__SAMD51__) || defined(ARDUINO_SAMD_ZERO))
1181
+ return dma_busy;
1182
+ #else
1183
+ return false ;
1184
+ #endif
1185
+ }
1186
+
1174
1187
/* !
1175
1188
@brief Issue a series of pixels, all the same color. Not self-
1176
1189
contained; should follow startWrite() and setAddrWindow() calls.
Original file line number Diff line number Diff line change @@ -234,6 +234,7 @@ class Adafruit_SPITFT : public Adafruit_GFX {
234
234
void dmaWait (void );
235
235
// Used by writePixels() in some situations, but might have rare need in
236
236
// user code, so it's public...
237
+ bool dmaBusy (void ) const ; // true if DMA is used and busy, false otherwise
237
238
void swapBytes (uint16_t *src, uint32_t len, uint16_t *dest = NULL );
238
239
239
240
// These functions are similar to the 'write' functions above, but with
You can’t perform that action at this time.
0 commit comments