void esp_dma_enable(void *opaque, int level) { ESPState *s = (ESPState*)opaque; if (level) { s->dma_enabled = 1; if (s->dma_cb) { if (s->dma_cb(s)) s->dma_cb = NULL; } } else { s->dma_enabled = 0; } }
static void esp_dma_enable(void *opaque, int irq, int level) { DeviceState *d = opaque; ESPState *s = container_of(d, ESPState, busdev.qdev); if (level) { s->dma_enabled = 1; DPRINTF("Raise enable\n"); if (s->dma_cb) { s->dma_cb(s); s->dma_cb = NULL; } } else { DPRINTF("Lower enable\n"); s->dma_enabled = 0; } }
static void esp_dma_enable(void *opaque, int irq, int level) { DeviceState *d = opaque; ESPState *s = container_of(d, ESPState, busdev.qdev); if (level) { s->dma_enabled = 1; trace_esp_dma_enable(); if (s->dma_cb) { s->dma_cb(s); s->dma_cb = NULL; } } else { trace_esp_dma_disable(); s->dma_enabled = 0; } }