avr_timer16.c (d34498309cff7560ac90c422c56e3137e6a64b19) avr_timer16.c (e3d0814368d00e7985c31edf5d0cfce45972d4be)
1/*
2 * AVR 16-bit timer
3 *
4 * Copyright (c) 2018 University of Kent
5 * Author: Ed Robbins
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public

--- 586 unchanged lines hidden (view full) ---

595 s->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, avr_timer16_interrupt, s);
596 s->enabled = true;
597}
598
599static void avr_timer16_class_init(ObjectClass *klass, void *data)
600{
601 DeviceClass *dc = DEVICE_CLASS(klass);
602
1/*
2 * AVR 16-bit timer
3 *
4 * Copyright (c) 2018 University of Kent
5 * Author: Ed Robbins
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public

--- 586 unchanged lines hidden (view full) ---

595 s->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, avr_timer16_interrupt, s);
596 s->enabled = true;
597}
598
599static void avr_timer16_class_init(ObjectClass *klass, void *data)
600{
601 DeviceClass *dc = DEVICE_CLASS(klass);
602
603 dc->reset = avr_timer16_reset;
603 device_class_set_legacy_reset(dc, avr_timer16_reset);
604 dc->realize = avr_timer16_realize;
605 device_class_set_props(dc, avr_timer16_properties);
606}
607
608static const TypeInfo avr_timer16_info = {
609 .name = TYPE_AVR_TIMER16,
610 .parent = TYPE_SYS_BUS_DEVICE,
611 .instance_size = sizeof(AVRTimer16State),
612 .instance_init = avr_timer16_init,
613 .class_init = avr_timer16_class_init,
614};
615
616static void avr_timer16_register_types(void)
617{
618 type_register_static(&avr_timer16_info);
619}
620
621type_init(avr_timer16_register_types)
604 dc->realize = avr_timer16_realize;
605 device_class_set_props(dc, avr_timer16_properties);
606}
607
608static const TypeInfo avr_timer16_info = {
609 .name = TYPE_AVR_TIMER16,
610 .parent = TYPE_SYS_BUS_DEVICE,
611 .instance_size = sizeof(AVRTimer16State),
612 .instance_init = avr_timer16_init,
613 .class_init = avr_timer16_class_init,
614};
615
616static void avr_timer16_register_types(void)
617{
618 type_register_static(&avr_timer16_info);
619}
620
621type_init(avr_timer16_register_types)