Skip to content

Commit

Permalink
butano: old hdma::start and hdma::high_priority_start api deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
GValiente committed Aug 23, 2024
1 parent 2d01c20 commit 6e6764e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 101 deletions.
40 changes: 10 additions & 30 deletions butano/include/bn_hdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,13 @@ namespace bn::hdma
*/
void start(const bn::span<const uint16_t>& source_ref, uint16_t& destination_ref);

/**
* @brief 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.
*
* 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.
*
* @param source_ref Const reference to the memory location to copy from.
* It must refer to `bn::display::height() * elements` values.
* @param elements Number of elements to copy per scanline (not bytes).
* @param destination_ref Reference to the memory location to copy to.
*/
/// @cond DO_NOT_DOCUMENT

[[deprecated("Call the other start() method instead")]]
void start(const uint16_t& source_ref, int elements, uint16_t& destination_ref);

/// @endcond

/**
* @brief Stops copying elements each frame.
*/
Expand Down Expand Up @@ -87,24 +78,13 @@ namespace bn::hdma
*/
void high_priority_start(const bn::span<const uint16_t>& source_ref, uint16_t& destination_ref);

/**
* @brief 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.
*
* 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.
*
* @param source_ref Const reference to the memory location to copy from.
* It must refer to `bn::display::height() * elements` values.
* @param elements Number of elements to copy per scanline (not bytes).
* @param destination_ref Reference to the memory location to copy to.
*/
/// @cond DO_NOT_DOCUMENT

[[deprecated("Call the other high_priority_start() method instead")]]
void high_priority_start(const uint16_t& source_ref, int elements, uint16_t& destination_ref);

/// @endcond

/**
* @brief Stops copying elements each frame with high priority.
*
Expand Down
3 changes: 2 additions & 1 deletion butano/include/documentation/bn_documentation_g_changelog.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
*
* @section changelog_18_0_0 18.0.0 (next release)
*
* Language standard updated to C++23.
* * Language standard updated to C++23.
* * Old bn::hdma::start and bn::hdma::high_priority_start API deprecated.
*
*
* @section changelog_17_9_0 17.9.0
Expand Down
2 changes: 1 addition & 1 deletion docs/changelog.html

Large diffs are not rendered by default.

68 changes: 0 additions & 68 deletions docs/namespacebn_1_1hdma.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,6 @@ <h2><a href="#func-members">Functions</a></h2>
uint16_t&amp; destination_ref)</span>
</dt>
<dd>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.</dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#a638d0cedbafe3ca7f5210061cd73aa80" class="m-doc">start</a>(</span><span class="m-doc-wrap">const uint16_t&amp; source_ref,
int elements,
uint16_t&amp; destination_ref)</span>
</dt>
<dd>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.</dd>
<dt id="a5aab39ced9c0980a5002e60bfddc639a">
<span class="m-doc-wrap-bumper">void <a href="#a5aab39ced9c0980a5002e60bfddc639a" class="m-doc-self">stop</a>(</span><span class="m-doc-wrap">)</span>
</dt>
Expand All @@ -93,12 +87,6 @@ <h2><a href="#func-members">Functions</a></h2>
uint16_t&amp; destination_ref)</span>
</dt>
<dd>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.</dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#af21b0e303b1ff0da00da161e87f774b8" class="m-doc">high_priority_start</a>(</span><span class="m-doc-wrap">const uint16_t&amp; source_ref,
int elements,
uint16_t&amp; destination_ref)</span>
</dt>
<dd>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.</dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#ad02fcb488caae5edd2633e5dbc7e72d8" class="m-doc">high_priority_stop</a>(</span><span class="m-doc-wrap">)</span>
</dt>
Expand Down Expand Up @@ -128,34 +116,6 @@ <h3>
</tr>
</tbody>
</table>
<p>The elements are not copied but referenced, so they should be alive while HDMA is running to avoid dangling references.</p><p>If the elements overlap, the behavior is undefined.</p>
</div></section>
<section class="m-doc-details" id="a638d0cedbafe3ca7f5210061cd73aa80"><div>
<h3>
<span class="m-doc-wrap-bumper">void bn::<wbr />hdma::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a638d0cedbafe3ca7f5210061cd73aa80" class="m-doc-self">start</a>(</span><span class="m-doc-wrap">const uint16_t&amp; source_ref,
int elements,
uint16_t&amp; destination_ref)</span></span>
</h3>
<p>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.</p>
<table class="m-table m-fullwidth m-flat">
<thead>
<tr><th colspan="2">Parameters</th></tr>
</thead>
<tbody>
<tr>
<td style="width: 1%">source_ref</td>
<td>Const reference to the memory location to copy from. It must refer to <code><a href="namespacebn_1_1display.html#aae0fa31daf76adf1ce66583433965159" class="m-doc">bn::<wbr />display::<wbr />height()</a> * elements</code> values.</td>
</tr>
<tr>
<td>elements</td>
<td>Number of elements to copy per scanline (not bytes).</td>
</tr>
<tr>
<td>destination_ref</td>
<td>Reference to the memory location to copy to.</td>
</tr>
</tbody>
</table>
<p>The elements are not copied but referenced, so they should be alive while HDMA is running to avoid dangling references.</p><p>If the elements overlap, the behavior is undefined.</p>
</div></section>
<section class="m-doc-details" id="a70ff40c328afff22c8a6b71ef5a2f507"><div>
Expand Down Expand Up @@ -186,34 +146,6 @@ <h3>
</tr>
</tbody>
</table>
<p>The elements are not copied but referenced, so they should be alive while HDMA is running to avoid dangling references.</p><p>If the elements overlap, the behavior is undefined.</p><p>High priority HDMA can cause issues with audio, so avoid it unless necessary.</p>
</div></section>
<section class="m-doc-details" id="af21b0e303b1ff0da00da161e87f774b8"><div>
<h3>
<span class="m-doc-wrap-bumper">void bn::<wbr />hdma::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#af21b0e303b1ff0da00da161e87f774b8" class="m-doc-self">high_priority_start</a>(</span><span class="m-doc-wrap">const uint16_t&amp; source_ref,
int elements,
uint16_t&amp; destination_ref)</span></span>
</h3>
<p>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.</p>
<table class="m-table m-fullwidth m-flat">
<thead>
<tr><th colspan="2">Parameters</th></tr>
</thead>
<tbody>
<tr>
<td style="width: 1%">source_ref</td>
<td>Const reference to the memory location to copy from. It must refer to <code><a href="namespacebn_1_1display.html#aae0fa31daf76adf1ce66583433965159" class="m-doc">bn::<wbr />display::<wbr />height()</a> * elements</code> values.</td>
</tr>
<tr>
<td>elements</td>
<td>Number of elements to copy per scanline (not bytes).</td>
</tr>
<tr>
<td>destination_ref</td>
<td>Reference to the memory location to copy to.</td>
</tr>
</tbody>
</table>
<p>The elements are not copied but referenced, so they should be alive while HDMA is running to avoid dangling references.</p><p>If the elements overlap, the behavior is undefined.</p><p>High priority HDMA can cause issues with audio, so avoid it unless necessary.</p>
</div></section>
<section class="m-doc-details" id="ad02fcb488caae5edd2633e5dbc7e72d8"><div>
Expand Down
2 changes: 1 addition & 1 deletion docs/searchdata-v2.js

Large diffs are not rendered by default.

0 comments on commit 6e6764e

Please sign in to comment.