]>
git.proxmox.com Git - mirror_qemu.git/blob - include/hw/misc/max111x.h
2 * Maxim MAX1110/1111 ADC chip emulation.
4 * Copyright (c) 2006 Openedhand Ltd.
5 * Written by Andrzej Zaborowski <balrog@zabor.org>
7 * This code is licensed under the GNU GPLv2.
9 * Contributions after 2012-01-13 are licensed under the terms of the
10 * GNU GPL, version 2 or (at your option) any later version.
13 #ifndef HW_MISC_MAX111X_H
14 #define HW_MISC_MAX111X_H
16 #include "hw/ssi/ssi.h"
19 * This is a model of the Maxim MAX1110/1111 ADC chip, which for QEMU
20 * is an SSI slave device. It has either 4 (max1110) or 8 (max1111)
24 * + GPIO inputs 0..3 (for max1110) or 0..7 (for max1111): set the value
25 * of each ADC input, as an unsigned 8-bit value
26 * + GPIO output 0: interrupt line
27 * + Properties "input0" to "input3" (max1110) or "input0" to "input7"
28 * (max1111): initial reset values for ADC inputs.
31 * + the interrupt line is not correctly implemented, and will never
32 * be lowered once it has been asserted.
38 /* Values of inputs at system reset (settable by QOM property) */
39 uint8_t reset_input
[8];
41 uint8_t tb1
, rb2
, rb3
;
48 #define TYPE_MAX_111X "max111x"
50 #define MAX_111X(obj) \
51 OBJECT_CHECK(MAX111xState, (obj), TYPE_MAX_111X)
53 #define TYPE_MAX_1110 "max1110"
54 #define TYPE_MAX_1111 "max1111"