hw/sd: Rename read/write_data() as read/write_byte()

The read/write_data() methods write do a single byte access
on the data line of a SD card. Rename them as read/write_byte().
Add some documentation (not in "hw/sd/sdcard_legacy.h" which we
are going to remove soon).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200814092346.21825-2-f4bug@amsat.org>
This commit is contained in:
Philippe Mathieu-Daudé 2020-08-14 11:23:40 +02:00
parent 9006f1e706
commit c769a88d44
5 changed files with 33 additions and 18 deletions

View file

@ -104,8 +104,23 @@ typedef struct {
/*< public >*/
int (*do_command)(SDState *sd, SDRequest *req, uint8_t *response);
void (*write_data)(SDState *sd, uint8_t value);
uint8_t (*read_data)(SDState *sd);
/**
* Write a byte to a SD card.
* @sd: card
* @value: byte to write
*
* Write a byte on the data lines of a SD card.
*/
void (*write_byte)(SDState *sd, uint8_t value);
/**
* Read a byte from a SD card.
* @sd: card
*
* Read a byte from the data lines of a SD card.
*
* Return: byte value read
*/
uint8_t (*read_byte)(SDState *sd);
bool (*data_ready)(SDState *sd);
void (*set_voltage)(SDState *sd, uint16_t millivolts);
uint8_t (*get_dat_lines)(SDState *sd);