misc: Point to correct simavr include dirs
[simavr] / simavr / cores / sim_megax4.c
1 /*
2         sim_megax4.c
3
4         Copyright 2008, 2009 Michel Pollet <buserror@gmail.com>
5
6         This file is part of simavr.
7
8         simavr is free software: you can redistribute it and/or modify
9         it under the terms of the GNU General Public License as published by
10         the Free Software Foundation, either version 3 of the License, or
11         (at your option) any later version.
12
13         simavr is distributed in the hope that it will be useful,
14         but WITHOUT ANY WARRANTY; without even the implied warranty of
15         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16         GNU General Public License for more details.
17
18         You should have received a copy of the GNU General Public License
19         along with simavr.  If not, see <http://www.gnu.org/licenses/>.
20  */
21 #include <stdio.h>
22 #include "sim_avr.h"
23
24 #include "sim_megax4.h"
25
26 void mx4_init(struct avr_t * avr)
27 {
28         struct mcu_t * mcu = (struct mcu_t*)avr;
29
30         printf("%s init\n", avr->mmcu);
31         
32         avr_eeprom_init(avr, &mcu->eeprom);
33         avr_flash_init(avr, &mcu->selfprog);
34         avr_extint_init(avr, &mcu->extint);
35         avr_watchdog_init(avr, &mcu->watchdog);
36         avr_ioport_init(avr, &mcu->porta);
37         avr_ioport_init(avr, &mcu->portb);
38         avr_ioport_init(avr, &mcu->portc);
39         avr_ioport_init(avr, &mcu->portd);
40         avr_uart_init(avr, &mcu->uart0);
41         avr_uart_init(avr, &mcu->uart1);
42         avr_adc_init(avr, &mcu->adc);
43         avr_timer_init(avr, &mcu->timer0);
44         avr_timer_init(avr, &mcu->timer1);
45         avr_timer_init(avr, &mcu->timer2);
46         avr_spi_init(avr, &mcu->spi);
47         avr_twi_init(avr, &mcu->twi);
48 }
49
50 void mx4_reset(struct avr_t * avr)
51 {
52 //      struct mcu_t * mcu = (struct mcu_t*)avr;
53 }