dataplane: fix build breakage on set_guest_notifiers()
[qemu/ar7.git] / hw / tmp105.h
blob51eff4be1c197262e60d512ee1dd015b9d4f6c12
1 /*
2 * Texas Instruments TMP105 Temperature Sensor
4 * Browse the data sheet:
6 * http://www.ti.com/lit/gpn/tmp105
8 * Copyright (C) 2012 Alex Horn <alex.horn@cs.ox.ac.uk>
9 * Copyright (C) 2008-2012 Andrzej Zaborowski <balrogg@gmail.com>
11 * This work is licensed under the terms of the GNU GPL, version 2 or
12 * later. See the COPYING file in the top-level directory.
14 #ifndef QEMU_TMP105_H
15 #define QEMU_TMP105_H
17 #include "i2c.h"
19 /**
20 * TMP105Reg:
21 * @TMP105_REG_TEMPERATURE: Temperature register
22 * @TMP105_REG_CONFIG: Configuration register
23 * @TMP105_REG_T_LOW: Low temperature register (also known as T_hyst)
24 * @TMP105_REG_T_HIGH: High temperature register (also known as T_OS)
26 * The following temperature sensors are
27 * compatible with the TMP105 registers:
28 * - adt75
29 * - ds1775
30 * - ds75
31 * - lm75
32 * - lm75a
33 * - max6625
34 * - max6626
35 * - mcp980x
36 * - stds75
37 * - tcn75
38 * - tmp100
39 * - tmp101
40 * - tmp105
41 * - tmp175
42 * - tmp275
43 * - tmp75
44 **/
45 typedef enum TMP105Reg {
46 TMP105_REG_TEMPERATURE = 0,
47 TMP105_REG_CONFIG,
48 TMP105_REG_T_LOW,
49 TMP105_REG_T_HIGH,
50 } TMP105Reg;
52 /**
53 * tmp105_set:
54 * @i2c: dispatcher to TMP105 hardware model
55 * @temp: temperature with 0.001 centigrades units in the range -40 C to +125 C
57 * Sets the temperature of the TMP105 hardware model.
59 * Bits 5 and 6 (value 32 and 64) in the register indexed by TMP105_REG_CONFIG
60 * determine the precision of the temperature. See Table 8 in the data sheet.
62 * @see_also: I2C_SLAVE macro
63 * @see_also: http://www.ti.com/lit/gpn/tmp105
65 void tmp105_set(I2CSlave *i2c, int temp);
67 #endif