2013/1/26 Paul Brook <p...@codesourcery.com> > > + if (!(s->dcr & DCR_WR) && (s->datacnt > 0)) { > > + ret = sd_read_data(s->card) > > + | sd_read_data(s->card) << 8 > > + | sd_read_data(s->card) << 16 > > + | sd_read_data(s->card) << 24; > > + s->datacnt -= 4; > > + if (s->datacnt <= 0) { > > + s->status |= STR_DAT_END; > > + } > > This will fail if datacnt is not a multiple of 4. > > Paul >
my bad, datacnt shall not be unsigned. -- Best wishes, Kuo-Jung Su