diff options
author | Paul Brook <paul@codesourcery.com> | 2009-11-20 00:03:47 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2009-11-22 21:27:40 +0000 |
commit | abd0c6bda0c89f36528e1a7efac99277607a5280 (patch) | |
tree | c9e5adc54b76a3e428c3222a5e48b2c1cd39764c /hw/twl92230.c | |
parent | a992fe3d0fc185112677286f7a02204d8245b61e (diff) | |
download | qemu-abd0c6bda0c89f36528e1a7efac99277607a5280.zip qemu-abd0c6bda0c89f36528e1a7efac99277607a5280.tar.gz qemu-abd0c6bda0c89f36528e1a7efac99277607a5280.tar.bz2 |
BCD cleanup
Combine multiple BCD implementations.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/twl92230.c')
-rw-r--r-- | hw/twl92230.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/hw/twl92230.c b/hw/twl92230.c index a6c60ba..93232da 100644 --- a/hw/twl92230.c +++ b/hw/twl92230.c @@ -183,16 +183,6 @@ static void menelaus_reset(i2c_slave *i2c) menelaus_update(s); } -static inline uint8_t to_bcd(int val) -{ - return ((val / 10) << 4) | (val % 10); -} - -static inline int from_bcd(uint8_t val) -{ - return ((val >> 4) * 10) + (val & 0x0f); -} - static void menelaus_gpio_set(void *opaque, int line, int level) { MenelausState *s = (MenelausState *) opaque; |