mingw: make simavr compilable with MinGW
[simavr] / examples / parts / ac_input.h
1 /*
2         ac_input.h
3
4         Copyright Luki <humbell@ethz.ch>
5         Copyright 2011 Michel Pollet <buserror@gmail.com>
6
7         This file is part of simavr.
8
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.
13
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.
18
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/>.
21  */
22
23 /*
24  * Simulates a 50hz changing signal
25  */
26
27 #ifndef __AC_INPUT_H__
28 #define __AC_INPUT_H__
29
30 #include "sim_irq.h"
31
32
33 enum {
34     IRQ_AC_OUT = 0,
35     IRQ_AC_COUNT
36 };
37
38 typedef struct ac_input_t {
39     avr_irq_t * irq;
40     struct avr_t * avr;
41     uint8_t value;
42 } ac_input_t;
43
44 void
45 ac_input_init(
46                         struct avr_t * avr,
47                         ac_input_t * b);
48
49 #endif