Skip to content

Commit

Permalink
ak2_sd: use a better define name for broken CMD25
Browse files Browse the repository at this point in the history
Remove test warning while at it
  • Loading branch information
lifehackerhansol committed Jan 22, 2024
1 parent 7c8330d commit f241dbb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions source/ak2_sd/Makefile_singlewrite
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ SOURCES := source
DATA := data
INCLUDES := include

$(warning "SINGLE WRITE ONLY")
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
ARCH := -mthumb-interwork -DTARGET_SINGLE_BLOCK_WRITE_ONLY
ARCH := -mthumb-interwork -DTARGET_HAS_BROKEN_CMD25

CFLAGS := -g -Wall -O2\
-mcpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer\
Expand Down
2 changes: 1 addition & 1 deletion source/ak2_sd/source/dldi_crt0.s
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@---------------------------------------------------------------------------------
@ Text identifier - can be anything up to 47 chars + terminating null -- 48 bytes
.align 4
#ifndef TARGET_SINGLE_BLOCK_WRITE_ONLY
#ifndef TARGET_HAS_BROKEN_CMD25
.asciz "Acekard AK2"
#else
.asciz "Acekard AK2 (Single-Write version)"
Expand Down
2 changes: 1 addition & 1 deletion source/ak2_sd/source/sddriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ void sddWriteBlocks( u32 addr, u32 blockCount, const void * buffer )
const u8 * pBuffer = (u8 *)buffer;

u32 address = _isSDHC ? addr : (addr << 9);
#ifndef TARGET_SINGLE_BLOCK_WRITE_ONLY
#ifndef TARGET_HAS_BROKEN_CMD25
if( 1 == blockCount ) {
u32 sdWriteBlock[2] = { 0xd5050018, address };
sendSDCommandR0( sdWriteBlock );
Expand Down

0 comments on commit f241dbb

Please sign in to comment.