Hi Peter, On 03/09/2018 02:03 PM, Peter Maydell wrote: > On 9 March 2018 at 15:36, Philippe Mathieu-Daudé <f4...@amsat.org> wrote: [...] >> static void sd_function_switch(SDState *sd, uint32_t arg) >> { >> - int i, mode, new_func; >> - mode = !!(arg & 0x80000000); >> - >> - sd->data[0] = 0x00; /* Maximum current consumption */ >> - sd->data[1] = 0x01; >> - sd->data[2] = 0x80; /* Supported group 6 functions */ >> - sd->data[3] = 0x01; [...] >> + >> + stw_be_p(sd->data + 0, 0x0001); /* Maximum current consumption */ > > Previously we were writing 0x00, 0x01 to the first 2 bytes of data; > now we will write 0x01, 0x00. Are you sure that's right ? I guess > it's the difference between claiming 1mA and 256mA.
Using stw_be_p() we still write [0x00, 0x01] (16-bit big endian), is this correct?