namespace
#include <bn_hdma.h>
hdma H-Blank direct memory access related functions.
Functions
- auto running() -> bool
- Indicates if HDMA is active or not.
- void start(const uint16_t& source_ref, int elements, uint16_t& destination_ref)
- Start copying each frame the given amount of elements from the memory location referenced by source_ref to the memory location referenced by destination_ref.
- void stop()
- Stops copying elements each frame.
- auto high_priority_running() -> bool
- Indicates if high priority HDMA is active or not.
- void high_priority_start(const uint16_t& source_ref, int elements, uint16_t& destination_ref)
- Start copying each frame with high priority the given amount of elements from the memory location referenced by source_ref to the memory location referenced by destination_ref.
- void high_priority_stop()
- Stops copying elements each frame with high priority.
Function documentation
void bn:: hdma:: start(const uint16_t& source_ref,
int elements,
uint16_t& destination_ref)
Start copying each frame the given amount of elements from the memory location referenced by source_ref to the memory location referenced by destination_ref.
Parameters | |
---|---|
source_ref | Const reference to the memory location to copy from. |
elements | Number of elements to copy (not bytes). |
destination_ref | Reference to the memory location to copy to. |
The elements are not copied but referenced, so they should be alive while HDMA is running to avoid dangling references.
If the elements overlap, the behavior is undefined.
bool bn:: hdma:: high_priority_running()
Indicates if high priority HDMA is active or not.
High priority HDMA can cause issues with audio, so avoid it unless necessary.
void bn:: hdma:: high_priority_start(const uint16_t& source_ref,
int elements,
uint16_t& destination_ref)
Start copying each frame with high priority the given amount of elements from the memory location referenced by source_ref to the memory location referenced by destination_ref.
Parameters | |
---|---|
source_ref | Const reference to the memory location to copy from. |
elements | Number of elements to copy (not bytes). |
destination_ref | Reference to the memory location to copy to. |
The elements are not copied but referenced, so they should be alive while HDMA is running to avoid dangling references.
If the elements overlap, the behavior is undefined.
High priority HDMA can cause issues with audio, so avoid it unless necessary.
void bn:: hdma:: high_priority_stop()
Stops copying elements each frame with high priority.
High priority HDMA can cause issues with audio, so avoid it unless necessary.