Makefiles: Tweaked to build using clang/llvm
[simavr] / simavr / sim / avr_lin.h
1 /*
2         avr_lin.h
3
4         Copyright 2008, 2011 Michel Pollet <buserror@gmail.com>
5         Copyright 2011 Markus Lampert  <mlampert@telus.net>
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 #ifndef __AVR_LIN_H__
24 #define __AVR_LIN_H__
25
26 #include "sim_avr.h"
27 #include "avr_uart.h"
28
29 typedef struct avr_lin_t {
30         avr_io_t io;
31
32         avr_io_addr_t r_linbtr;
33         avr_io_addr_t r_linbrrh, r_linbrrl;
34
35         avr_regbit_t lena;
36         avr_regbit_t ldisr;
37         avr_regbit_t lbt;
38
39         avr_uart_t uart;  // used when LIN controller is setup as a UART
40 } avr_lin_t;
41
42 void
43 avr_lin_init(
44                 avr_t *avr,
45                 avr_lin_t *port);
46
47 #endif /* __AVR_LIN_H__ */