namespace
#include <bn_hdma.h>
hdma H-Blank direct memory access related functions.
Typedefs
- using interrupt_handler_type = void(*)()
- Interrupt handler type alias.
Functions
- auto running() -> bool
- Indicates if HDMA is active or not.
-
void start(const bn::
span<const uint16_t>& source_ref, 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 bn::
span<const uint16_t>& source_ref, 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.
-
auto high_priority_interrupt_handler() -> interrupt_
handler_ type - Returns the handler of the high priority HDMA interrupt.
-
void set_high_priority_interrupt_handler(interrupt_
handler_ type interrupt_handler) - Sets the handler of the high priority HDMA interrupt.
Function documentation
void bn:: hdma:: start(const bn:: span<const uint16_t>& source_ref,
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. It must refer to a multiple of bn:: |
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 bn:: span<const uint16_t>& source_ref,
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. It must refer to a multiple of bn:: |
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.
void bn:: hdma:: set_high_priority_interrupt_handler(interrupt_ handler_ type interrupt_handler)
Sets the handler of the high priority HDMA interrupt.
BN_