xfer -> transfer

This commit is contained in:
Gwilym Kuiper 2022-11-17 21:12:18 +00:00
parent c8ff3b4359
commit 51a8ec4d95
2 changed files with 6 additions and 6 deletions

View file

@ -36,14 +36,14 @@ agb_thumb_end agb_rs__WramVerifyBuf
@
@ void WramXferBuf(const char* source, char* dest, int count);
@ void WramTransferBuf(const char* source, char* dest, int count);
@
@ A routine that copies one buffer into another.
@
agb_thumb_func agb_rs__WramXferBuf
agb_thumb_func agb_rs__WramTransferBuf
0: sub r2, #1
ldrb r3, [r0,r2]
strb r3, [r1,r2]
bne 0b
bx lr
agb_thumb_end agb_rs__WramXferBuf
agb_thumb_end agb_rs__WramTransferBuf

View file

@ -3,7 +3,7 @@
//! performed via code in WRAM and cannot be accessed by DMA.
extern "C" {
fn agb_rs__WramXferBuf(src: *const u8, dst: *mut u8, count: usize);
fn agb_rs__WramTransferBuf(src: *const u8, dst: *mut u8, count: usize);
fn agb_rs__WramReadByte(src: *const u8) -> u8;
fn agb_rs__WramVerifyBuf(buf1: *const u8, buf2: *const u8, count: usize) -> bool;
}
@ -18,7 +18,7 @@ extern "C" {
#[inline(always)]
pub unsafe fn read_raw_buf(dst: &mut [u8], src: usize) {
if !dst.is_empty() {
agb_rs__WramXferBuf(src as _, dst.as_mut_ptr(), dst.len());
agb_rs__WramTransferBuf(src as _, dst.as_mut_ptr(), dst.len());
}
}
@ -31,7 +31,7 @@ pub unsafe fn read_raw_buf(dst: &mut [u8], src: usize) {
#[inline(always)]
pub unsafe fn write_raw_buf(dst: usize, src: &[u8]) {
if !src.is_empty() {
agb_rs__WramXferBuf(src.as_ptr(), dst as _, src.len());
agb_rs__WramTransferBuf(src.as_ptr(), dst as _, src.len());
}
}