aboutsummaryrefslogtreecommitdiff
path: root/hw/display/ssd0303.c
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2018-11-14 11:50:50 -0600
committerCorey Minyard <cminyard@mvista.com>2019-02-27 21:06:08 -0600
commit2ac4c5f4d2415116d3f417a32311d437791dcfce (patch)
tree5abf8e22939c5c1c030643ffe2fcdfe7bb16344c /hw/display/ssd0303.c
parent93198b6cad8af03996373584284a1673ad6000cb (diff)
i2c: have I2C receive operation return uint8_t
It is never supposed to fail and cannot return an error, so just have it return the proper type. Have it return 0xff on nothing available, since that's what would happen on a real bus. Signed-off-by: Corey Minyard <cminyard@mvista.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'hw/display/ssd0303.c')
-rw-r--r--hw/display/ssd0303.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/display/ssd0303.c b/hw/display/ssd0303.c
index eb90ba26be..8edf34986c 100644
--- a/hw/display/ssd0303.c
+++ b/hw/display/ssd0303.c
@@ -62,10 +62,10 @@ typedef struct {
uint8_t framebuffer[132*8];
} ssd0303_state;
-static int ssd0303_recv(I2CSlave *i2c)
+static uint8_t ssd0303_recv(I2CSlave *i2c)
{
BADF("Reads not implemented\n");
- return -1;
+ return 0xff;
}
static int ssd0303_send(I2CSlave *i2c, uint8_t data)