forked from len0rd/rockbox
gmini: updated to new interface for ddma
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6055 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bda19bf23d
commit
234489a449
1 changed files with 2 additions and 3 deletions
|
@ -238,7 +238,6 @@ unsigned short crc_16(const unsigned char* buf, unsigned len)
|
|||
|
||||
|
||||
#if CONFIG_CPU == TCC730
|
||||
extern int idatastart __attribute__ ((section(".idata")));
|
||||
static unsigned flash_word_temp __attribute__ ((section (".idata")));
|
||||
|
||||
static void flash_write_word(unsigned addr, unsigned value) __attribute__ ((section(".icode")));
|
||||
|
@ -246,13 +245,13 @@ static void flash_write_word(unsigned addr, unsigned value) {
|
|||
flash_word_temp = value;
|
||||
|
||||
long extAddr = (long)addr << 1;
|
||||
ddma_transfer(1, 1, (char*)&flash_word_temp - (char*)&idatastart, extAddr, 2);
|
||||
ddma_transfer(1, 1, &flash_word_temp, extAddr, 2);
|
||||
}
|
||||
|
||||
static unsigned flash_read_word(unsigned addr) __attribute__ ((section(".icode")));
|
||||
static unsigned flash_read_word(unsigned addr) {
|
||||
long extAddr = (long)addr << 1;
|
||||
ddma_transfer(1, 1, (char*)&flash_word_temp - (char*)&idatastart, extAddr, 2);
|
||||
ddma_transfer(1, 1, &flash_word_temp, extAddr, 2);
|
||||
return flash_word_temp;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue