Returns true if the DMA is enabled and executed successfully. Returns false if execution was blocked (DMAE or master DMA enabler).
| 179 | // Returns true if the DMA is enabled and executed successfully. Returns false if execution |
| 180 | // was blocked (DMAE or master DMA enabler). |
| 181 | static bool QuickDmaExec( void (*func)(), u32 mem) |
| 182 | { |
| 183 | bool ret = false; |
| 184 | DMACh& reg = (DMACh&)psHu32(mem); |
| 185 | |
| 186 | if (reg.chcr.STR && dmacRegs.ctrl.DMAE && !psHu8(DMAC_ENABLER+2)) |
| 187 | { |
| 188 | func(); |
| 189 | ret = true; |
| 190 | } |
| 191 | |
| 192 | return ret; |
| 193 | } |
| 194 | |
| 195 | |
| 196 | static tDMAC_QUEUE QueuedDMA(0); |