From 0166059d1b0f49c4aa74f65cfb0c753172fda9d7 Mon Sep 17 00:00:00 2001 From: joevt Date: Tue, 21 Nov 2023 20:28:17 -0800 Subject: [PATCH] dbdma: Add set_stat method. A hardware device may have status flags connected to 8 status bits of the DBDMA engine. --- devices/common/dbdma.h | 1 + 1 file changed, 1 insertion(+) diff --git a/devices/common/dbdma.h b/devices/common/dbdma.h index 81ab3c0..bd36a8d 100644 --- a/devices/common/dbdma.h +++ b/devices/common/dbdma.h @@ -91,6 +91,7 @@ public: void set_callbacks(DbdmaCallback start_cb, DbdmaCallback stop_cb); uint32_t reg_read(uint32_t offset, int size); void reg_write(uint32_t offset, uint32_t value, int size); + void set_stat(uint8_t new_stat) { this->ch_stat = (this->ch_stat & 0xff00) | new_stat; } bool is_out_active(); bool is_in_active();