mirror of
git://projects.qi-hardware.com/antorcha.git
synced 2024-11-22 08:05:20 +02:00
tornado/fw/mmc.[ch]: read/write address is not in sectors, just call it "addr"
This commit is contained in:
parent
59b53f6e89
commit
3c343536b1
@ -105,12 +105,12 @@ static bool mmc_wait(void)
|
||||
}
|
||||
|
||||
|
||||
bool mmc_begin_read(uint32_t sector)
|
||||
bool mmc_begin_read(uint32_t addr)
|
||||
{
|
||||
uint8_t res;
|
||||
|
||||
mmc_begin();
|
||||
mmc_command(MMC_READ_SINGLE_BLOCK, sector);
|
||||
mmc_command(MMC_READ_SINGLE_BLOCK, addr);
|
||||
res = mmc_r1();
|
||||
DEBUG("mmc_begin_read: r1 = 0x%02x", res);
|
||||
if (res) {
|
||||
@ -135,12 +135,12 @@ bool mmc_end_read(void)
|
||||
}
|
||||
|
||||
|
||||
bool mmc_begin_write(uint32_t sector)
|
||||
bool mmc_begin_write(uint32_t addr)
|
||||
{
|
||||
uint8_t res;
|
||||
|
||||
mmc_begin();
|
||||
mmc_command(MMC_WRITE_BLOCK, sector);
|
||||
mmc_command(MMC_WRITE_BLOCK, addr);
|
||||
res = mmc_r1();
|
||||
DEBUG("mmc_begin_write: r1 = 0x%02x", res);
|
||||
if (res) {
|
||||
|
@ -21,11 +21,11 @@
|
||||
#define MMC_BLOCK 512
|
||||
|
||||
|
||||
bool mmc_begin_read(uint32_t sector);
|
||||
bool mmc_begin_read(uint32_t addr);
|
||||
uint8_t mmc_read(void);
|
||||
bool mmc_end_read(void);
|
||||
|
||||
bool mmc_begin_write(uint32_t sector);
|
||||
bool mmc_begin_write(uint32_t addr);
|
||||
void mmc_write(uint8_t data);
|
||||
bool mmc_end_write(void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user