#ifndef inteldma_h
#define inteldma_h

#include <stdint.h>

typedef struct intel_dma_t intel_dma_t;

// returns NULL if DMA cannot be used
intel_dma_t* new_inteldma(void);

// returns 0 if cannot build DMA
int inteldma_startScreen(intel_dma_t* idma, uint32_t screen_bpr, uint32_t data_bpr);
int inteldma_addScreenRect(intel_dma_t* idma
                         , uint8_t* screen_pos, uint8_t* data_pos
                         , int width, int height);

void inteldma_transferScreen(intel_dma_t* idma);
void inteldma_cleanupTransfer(intel_dma_t* idma);
void delete_inteldma(intel_dma_t** idma);

#endif
