SimAVR
AVR Simulator
sim_avr_types.h
Go to the documentation of this file.
1 /*
2  * sim_avr_types.h
3  *
4  * Copyright 2008-2012 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 it under the terms of the GNU
9  * General Public License as published by the Free Software Foundation, either version 3 of the
10  * License, or (at your option) any later version.
11  *
12  * simavr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
13  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14  * Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along with simavr. If not, see
17  * <http://www.gnu.org/licenses/>.
18  */
19 
25 #ifndef __SIM_AVR_TYPES_H___
26 #define __SIM_AVR_TYPES_H___
27 
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32 
33 #include <stdint.h>
34 #include <inttypes.h>
35 
36  typedef uint64_t avr_cycle_count_t;
37  typedef uint16_t avr_io_addr_t;
38 
47  typedef struct avr_regbit_t
48  {
49  uint32_t reg:9, bit:3, mask:8;
50  } avr_regbit_t;
51 
53 #define PRI_avr_cycle_count PRIu64
54 
55  struct avr_t;
56 
57 #ifdef __cplusplus
58 };
59 #endif
60 
61 #endif /* __SIM_AVR_TYPES_H___ */
62 
uint32_t reg
Definition: sim_avr_types.h:49
uint16_t avr_io_addr_t
Definition: sim_avr_types.h:37
uint32_t bit
Definition: sim_avr_types.h:49
This 'structure' is a packed representation of an IO register 'bit' (or consecutive bits)...
Definition: sim_avr_types.h:47
struct avr_regbit_t avr_regbit_t
This 'structure' is a packed representation of an IO register 'bit' (or consecutive bits)...
uint32_t mask
Definition: sim_avr_types.h:49
uint64_t avr_cycle_count_t
Definition: sim_avr_types.h:36
Main AVR instance.
Definition: sim_avr.h:142