uint32_t wm8750_adc_dat(void *opaque);
void *wm8750_dac_buffer(void *opaque, int samples);
void wm8750_dac_commit(void *opaque);
-void wm8750_set_bclk_in(void *opaque, int hz);
+void wm8750_set_bclk_in(void *opaque, int new_hz);
/* ssd0303.c */
void ssd0303_init(DisplayState *ds, i2c_bus *bus, int address);
static void set_next_tick(rc4030State *s)
{
qemu_irq_lower(s->timer_irq);
- uint32_t hz;
+ uint32_t tm_hz;
- hz = 1000 / (s->itr + 1);
+ tm_hz = 1000 / (s->itr + 1);
- qemu_mod_timer(s->periodic_timer, qemu_get_clock(vm_clock) + ticks_per_sec / hz);
+ qemu_mod_timer(s->periodic_timer, qemu_get_clock(vm_clock) + ticks_per_sec / tm_hz);
}
/* called for accesses to rc4030 */
struct {
uint8_t ctrl;
uint16_t comp;
- QEMUTimer *hz;
+ QEMUTimer *hz_tm;
int64_t next;
struct tm tm;
struct tm new;
static inline void menelaus_rtc_start(struct menelaus_s *s)
{
s->rtc.next =+ qemu_get_clock(rt_clock);
- qemu_mod_timer(s->rtc.hz, s->rtc.next);
+ qemu_mod_timer(s->rtc.hz_tm, s->rtc.next);
}
static inline void menelaus_rtc_stop(struct menelaus_s *s)
{
- qemu_del_timer(s->rtc.hz);
+ qemu_del_timer(s->rtc.hz_tm);
s->rtc.next =- qemu_get_clock(rt_clock);
if (s->rtc.next < 1)
s->rtc.next = 1;
s->rtc.next_comp --;
s->rtc.alm_sec --;
s->rtc.next += 1000;
- qemu_mod_timer(s->rtc.hz, s->rtc.next);
+ qemu_mod_timer(s->rtc.hz_tm, s->rtc.next);
if ((s->rtc.ctrl >> 3) & 3) { /* EVERY */
menelaus_rtc_update(s);
if (((s->rtc.ctrl >> 3) & 3) == 1 && !s->rtc.tm.tm_sec)
s->i2c.send = menelaus_tx;
s->irq = irq;
- s->rtc.hz = qemu_new_timer(rt_clock, menelaus_rtc_hz, s);
+ s->rtc.hz_tm = qemu_new_timer(rt_clock, menelaus_rtc_hz, s);
s->in = qemu_allocate_irqs(menelaus_gpio_set, s, 3);
s->pwrbtn = qemu_allocate_irqs(menelaus_pwrbtn_set, s, 1)[0];
int div2, sldiv2, dots;
int clocking_mode;
int clock_sel;
- const int hz[] = {25175000, 28322000, 25175000, 25175000};
+ const int clk_hz[] = {25175000, 28322000, 25175000, 25175000};
int64_t chars_per_sec;
struct vga_precise_retrace *r = &s->retrace_info.precise;
clock_sel = (s->msr >> 2) & 3;
dots = (s->msr & 1) ? 8 : 9;
- chars_per_sec = hz[clock_sel] / dots;
+ chars_per_sec = clk_hz[clock_sel] / dots;
htotal_chars <<= clocking_mode;
div2, sldiv2,
clocking_mode,
clock_sel,
- hz[clock_sel],
+ clk_hz[clock_sel],
dots,
r->ticks_per_char
);
return *data;
}
-void wm8750_set_bclk_in(void *opaque, int hz)
+void wm8750_set_bclk_in(void *opaque, int new_hz)
{
struct wm8750_s *s = (struct wm8750_s *) opaque;
- s->ext_adc_hz = hz;
- s->ext_dac_hz = hz;
+ s->ext_adc_hz = new_hz;
+ s->ext_dac_hz = new_hz;
wm8750_clk_update(s, 1);
}