Date:2012-12-05 17:23:54 (6 years 9 months ago)
Author:Werner Almesberger
Commit:3c343536b11c953359aa1d29c99fe234d7399644
Message:tornado/fw/mmc.[ch]: read/write address is not in sectors, just call it "addr"

Files: tornado/fw/mmc.c (2 diffs)
tornado/fw/mmc.h (1 diff)

Change Details

tornado/fw/mmc.c
105105}
106106
107107
108bool mmc_begin_read(uint32_t sector)
108bool mmc_begin_read(uint32_t addr)
109109{
110110    uint8_t res;
111111
112112    mmc_begin();
113    mmc_command(MMC_READ_SINGLE_BLOCK, sector);
113    mmc_command(MMC_READ_SINGLE_BLOCK, addr);
114114    res = mmc_r1();
115115    DEBUG("mmc_begin_read: r1 = 0x%02x", res);
116116    if (res) {
...... 
135135}
136136
137137
138bool mmc_begin_write(uint32_t sector)
138bool mmc_begin_write(uint32_t addr)
139139{
140140    uint8_t res;
141141
142142    mmc_begin();
143    mmc_command(MMC_WRITE_BLOCK, sector);
143    mmc_command(MMC_WRITE_BLOCK, addr);
144144    res = mmc_r1();
145145    DEBUG("mmc_begin_write: r1 = 0x%02x", res);
146146    if (res) {
tornado/fw/mmc.h
2121#define MMC_BLOCK 512
2222
2323
24bool mmc_begin_read(uint32_t sector);
24bool mmc_begin_read(uint32_t addr);
2525uint8_t mmc_read(void);
2626bool mmc_end_read(void);
2727
28bool mmc_begin_write(uint32_t sector);
28bool mmc_begin_write(uint32_t addr);
2929void mmc_write(uint8_t data);
3030bool mmc_end_write(void);
3131

Archive Download the corresponding diff file

Branches:
master
tornado-v1



interactive