DMA_Interface
DMA_Interface provides basic functionality and structure for processing "blit" operations using DMA.
Inherited by: NoDMA
Public Functions
virtual void | addToQueue(const BlitOp & op) |
Inserts a BlitOp for processing. | |
virtual void | flush() |
This function blocks until all DMA transfers in the queue have been completed. | |
bool | getAllowed() const |
Gets whether a DMA operation is allowed to begin. | |
virtual BlitOperations | getBlitCaps() =0 |
Gets the blit capabilities of this DMA. | |
virtual DMAType | getDMAType() |
Function for obtaining the DMA type of the concrete DMA_Interface implementation. | |
virtual void | initialize() |
Perform initialization. | |
uint8_t | isDmaQueueEmpty() |
Query if the DMA queue is empty. | |
uint8_t | isDmaQueueFull() |
Query if the DMA queue is full. | |
bool | isDMARunning() |
Query if the DMA is running. | |
void | setAllowed(bool allowed) |
Sets whether or not a DMA operation is allowed to begin. | |
virtual void | signalDMAInterrupt() =0 |
This function is called automatically by the framework when a DMA interrupt has been received. | |
virtual void | start() |
Signals that DMA transfers can start. | |
virtual | ~DMA_Interface() |
Finalizes an instance of the DMA_Interface class. | |
Protected Functions
virtual void | disableAlpha() |
Configures blit-op hardware for solid operation (no alpha-blending) | |
DMA_Interface(DMA_Queue & dmaQueue) | |
Constructs a DMA Interface object. | |
virtual void | enableAlpha(uint8_t alpha) |
Configures blit-op hardware for alpha-blending. | |
virtual void | enableCopyWithTransparentPixels(uint8_t alpha) |
Configures blit-op hardware for alpha-blending while simultaneously skipping transparent pixels. | |
virtual void | execute() |
Performs a queued blit-op. | |
virtual void | executeCompleted() |
To be called when blit-op has been performed. | |
virtual void | seedExecution() |
Called when elements are added to the DMA-queue. | |
virtual void | setupDataCopy(const BlitOp & blitOp) =0 |
Configures blit-op hardware for a 2D copy as specified by blitOp. | |
virtual void | setupDataFill(const BlitOp & blitOp) =0 |
Configures blit-op hardware for a 2D fill as specified by blitOp. | |
virtual void | waitForFrameBufferSemaphore() |
Waits until framebuffer semaphore is available (i.e. | |
Protected Attributes
bool | isAllowed |
true if DMA transfers are currently allowed. | |
bool | isRunning |
true if a DMA transfer is currently ongoing. | |
DMA_Queue & | queue |
Reference to the DMA queue. | |
Public Functions Documentation
addToQueue
virtual void addToQueue | ( | const BlitOp & | op | ) | |
Inserts a BlitOp for processing.
This also potentially starts the DMA controller, if not already running.
op | The operation to add. |
flush
virtual void flush | ( | ) |
This function blocks until all DMA transfers in the queue have been completed.
Reimplemented by: touchgfx::NoDMA::flush
getAllowed
bool getAllowed | ( | ) | const |
Gets whether a DMA operation is allowed to begin.
Used in single-buffering to avoid changing the framebuffer while display is being updated.
true if DMA is allowed to start, false if not.
getBlitCaps
virtual BlitOperations getBlitCaps | ( | ) | =0 |
Gets the blit capabilities of this DMA.
The blit operations supported by this DMA implementation.
Reimplemented by: touchgfx::NoDMA::getBlitCaps
getDMAType
virtual DMAType getDMAType | ( | ) |
Function for obtaining the DMA type of the concrete DMA_Interface implementation.
As default, will return DMA_TYPE_GENERIC type value.
a DMAType value of the concrete DMA_Interface implementation.
initialize
virtual void initialize | ( | ) |
Perform initialization.
Does nothing in this base class.
isDmaQueueEmpty
uint8_t isDmaQueueEmpty | ( | ) |
Query if the DMA queue is empty.
1 if DMA queue is empty, else 0.
isDmaQueueFull
uint8_t isDmaQueueFull | ( | ) |
Query if the DMA queue is full.
1 if DMA queue is full, else 0.
isDMARunning
bool isDMARunning | ( | ) |
Query if the DMA is running.
true if a DMA operation is currently in progress.
setAllowed
void setAllowed | ( | bool | allowed | ) | |
Sets whether or not a DMA operation is allowed to begin.
Used in single-buffering to avoid changing the framebuffer while display is being updated.
allowed | true if DMA transfers are allowed. |
signalDMAInterrupt
virtual void signalDMAInterrupt | ( | ) | =0 |
This function is called automatically by the framework when a DMA interrupt has been received.
This function is called automatically by the framework when a DMA interrupt has been received.
Reimplemented by: touchgfx::NoDMA::signalDMAInterrupt
start
virtual void start | ( | ) |
Signals that DMA transfers can start.
If any elements are in the queue, start it.
~DMA_Interface
virtual ~DMA_Interface | ( | ) |
Finalizes an instance of the DMA_Interface class.
Protected Functions Documentation
disableAlpha
virtual void disableAlpha | ( | ) |
Configures blit-op hardware for solid operation (no alpha-blending)
DMA_Interface
DMA_Interface | ( | DMA_Queue & | dmaQueue | ) | |
Constructs a DMA Interface object.
dmaQueue | Reference to the queue of DMA operations. |
enableAlpha
virtual void enableAlpha | ( | uint8_t | alpha | ) | |
Configures blit-op hardware for alpha-blending.
alpha | The alpha-blending value to apply. |
enableCopyWithTransparentPixels
virtual void enableCopyWithTransparentPixels | ( | uint8_t | alpha | ) | |
Configures blit-op hardware for alpha-blending while simultaneously skipping transparent pixels.
alpha | The alpha-blending value to apply. |
execute
virtual void execute | ( | ) |
Performs a queued blit-op.
executeCompleted
virtual void executeCompleted | ( | ) |
To be called when blit-op has been performed.
seedExecution
virtual void seedExecution | ( | ) |
Called when elements are added to the DMA-queue.
Note
The framebuffer must be locked before this method returns if the DMA-queue is non- empty.
setupDataCopy
virtual void setupDataCopy | ( | const BlitOp & | blitOp | ) | |
Configures blit-op hardware for a 2D copy as specified by blitOp.
blitOp | The operation to execute. |
Reimplemented by: touchgfx::NoDMA::setupDataCopy
setupDataFill
virtual void setupDataFill | ( | const BlitOp & | blitOp | ) | |
Configures blit-op hardware for a 2D fill as specified by blitOp.
blitOp | The operation to execute. |
Reimplemented by: touchgfx::NoDMA::setupDataFill
waitForFrameBufferSemaphore
virtual void waitForFrameBufferSemaphore | ( | ) |
Waits until framebuffer semaphore is available (i.e.
neither DMA or application is accessing the framebuffer).
Protected Attributes Documentation
isAllowed
bool isAllowed
true if DMA transfers are currently allowed.
isRunning
bool isRunning
true if a DMA transfer is currently ongoing.
queue
DMA_Queue & queue
Reference to the DMA queue.