qemu/include/hw/char/goldfish_tty.h
<<
>>
Prefs
   1/*
   2 * SPDX-License-Identifer: GPL-2.0-or-later
   3 *
   4 * Goldfish TTY
   5 *
   6 * (c) 2020 Laurent Vivier <laurent@vivier.eu>
   7 *
   8 */
   9
  10#ifndef HW_CHAR_GOLDFISH_TTY_H
  11#define HW_CHAR_GOLDFISH_TTY_H
  12
  13#include "qemu/fifo8.h"
  14#include "chardev/char-fe.h"
  15
  16#define TYPE_GOLDFISH_TTY "goldfish_tty"
  17OBJECT_DECLARE_SIMPLE_TYPE(GoldfishTTYState, GOLDFISH_TTY)
  18
  19#define GOLFISH_TTY_BUFFER_SIZE 128
  20
  21struct GoldfishTTYState {
  22    SysBusDevice parent_obj;
  23
  24    MemoryRegion iomem;
  25    qemu_irq irq;
  26    CharBackend chr;
  27
  28    uint32_t data_len;
  29    uint64_t data_ptr;
  30    bool int_enabled;
  31
  32    Fifo8 rx_fifo;
  33};
  34
  35#endif
  36