Revision cc9c9ffc hw/pl011.c

b/hw/pl011.c
195 195
        return s->read_count < 1;
196 196
}
197 197

  
198
static void pl011_receive(void *opaque, const uint8_t *buf, int size)
198
static void pl011_put_fifo(void *opaque, uint32_t value)
199 199
{
200 200
    pl011_state *s = (pl011_state *)opaque;
201 201
    int slot;
......
203 203
    slot = s->read_pos + s->read_count;
204 204
    if (slot >= 16)
205 205
        slot -= 16;
206
    s->read_fifo[slot] = *buf;
206
    s->read_fifo[slot] = value;
207 207
    s->read_count++;
208 208
    s->flags &= ~PL011_FLAG_RXFE;
209 209
    if (s->cr & 0x10 || s->read_count == 16) {
......
215 215
    }
216 216
}
217 217

  
218
static void pl011_receive(void *opaque, const uint8_t *buf, int size)
219
{
220
    pl011_put_fifo(opaque, *buf);
221
}
222

  
218 223
static void pl011_event(void *opaque, int event)
219 224
{
220
    /* ??? Should probably implement break.  */
225
    if (event == CHR_EVENT_BREAK)
226
        pl011_put_fifo(opaque, 0x400);
221 227
}
222 228

  
223 229
static CPUReadMemoryFunc *pl011_readfn[] = {

Also available in: Unified diff