4 Copyright 2008, 2009 Michel Pollet <buserror@gmail.com>
5 Jon Escombe <lists@dresco.co.uk>
7 This file is part of simavr.
9 simavr is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 simavr is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with simavr. If not, see <http://www.gnu.org/licenses/>.
26 #include "sim_tinyx4.h"
28 void tx4_init(struct avr_t * avr)
30 struct mcu_t * mcu = (struct mcu_t*)avr;
32 printf("%s init\n", avr->mmcu);
34 avr_eeprom_init(avr, &mcu->eeprom);
35 avr_watchdog_init(avr, &mcu->watchdog);
36 avr_extint_init(avr, &mcu->extint);
37 avr_ioport_init(avr, &mcu->porta);
38 avr_ioport_init(avr, &mcu->portb);
39 avr_adc_init(avr, &mcu->adc);
40 avr_timer_init(avr, &mcu->timer0);
41 avr_timer_init(avr, &mcu->timer1);
44 void tx4_reset(struct avr_t * avr)
46 // struct mcu_t * mcu = (struct mcu_t*)avr;