This file is indexed.

/usr/include/gpsim/p16f8x.h is in gpsim-dev 0.29.0-2+b2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
/*
   Copyright (C) 1998-2002 T. Scott Dattalo
   Copyright (C) 2006	   Roy Rankin

This file is part of the libgpsim library of gpsim

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see 
<http://www.gnu.org/licenses/lgpl-2.1.html>.
*/

#ifndef __P16F8X_H__
#define __P16F8X_H__

#include "p16x6x.h"

#include "pir.h"
#include "eeprom.h"
#include "comparator.h"
#include "a2dconverter.h"

/***************************************************************************
 *
 * Include file for:  P16F87, P16F88
 *
 *
 * The F8x devices are similar to 16F62x
 * 
 *
 ***************************************************************************/

class P16F8x : public P16X6X_processor
{
public:

  PIR1v2 *pir1_2_reg;
  PIR2v2 *pir2_2_reg;
  PIR_SET_2 pir_set_2_def;

  WDTCON       wdtcon;
  OSCCON       osccon;
  OSCTUNE      osctune;


  P16F8x(const char *_name=0, const char *desc=0);
  ~P16F8x();
  virtual void set_out_of_range_pm(unsigned int address, unsigned int value);

  USART_MODULE usart;
  ComparatorModule comparator;
  virtual PROCESSOR_TYPE isa(){return _P16F87_;};
  virtual void create_symbols();
  virtual unsigned int register_memory_size () const { return 0x200;};

  virtual unsigned int program_memory_size() { return 0; };

  virtual void create_sfr_map();

  // The f628 (at least) I/O pins depend on the Fosc Configuration bits.
  virtual bool set_config_word(unsigned int address, unsigned int cfg_word);


  virtual void create(int eesize);
  virtual void create_iopin_map();
  virtual void create_config_memory();

  virtual void set_eeprom(EEPROM *ep) {
    // Use set_eeprom_pir as P16F8x expects to have a PIR capable EEPROM
    assert(0);
  }

  virtual void set_eeprom_wide(EEPROM_WIDE *ep) {
    eeprom = ep;
  }
  virtual EEPROM_WIDE *get_eeprom() { return ((EEPROM_WIDE *)eeprom); }


  virtual PIR *get_pir1() { return (pir1); }
  virtual PIR *get_pir2() { return (pir2); }
  virtual PIR_SET *get_pir_set() { return (&pir_set_2_def); }
};

class P16F81x : public P16X6X_processor
{
public:

  PIR1v2 *pir1_2_reg;
  PIR2v2 *pir2_2_reg;
  PIR_SET_2 pir_set_2_def;

  ADCON0 adcon0;
  ADCON1 adcon1;
  sfr_register  adresh;
  sfr_register  adresl;

  OSCCON       osccon;
  OSCTUNE      osctune;


  P16F81x(const char *_name=0, const char *desc=0);
  ~P16F81x();
  virtual void set_out_of_range_pm(unsigned int address, unsigned int value);

  virtual PROCESSOR_TYPE isa(){return _P16F818_;};
  virtual void create_symbols();
  virtual unsigned int register_memory_size () const { return 0x200;};

  virtual unsigned int program_memory_size() { return 0; };

  virtual void create_sfr_map();

  // The f628 (at least) I/O pins depend on the Fosc Configuration bits.
  virtual bool set_config_word(unsigned int address, unsigned int cfg_word);
  virtual void create_config_memory();


  virtual void create(int eesize);
  virtual void create_iopin_map();

  virtual void set_eeprom(EEPROM *ep) {
    // Use set_eeprom_pir as P16F8x expects to have a PIR capable EEPROM
    assert(0);
  }

  virtual void set_eeprom_wide(EEPROM_WIDE *ep) {
    eeprom = ep;
  }
  virtual EEPROM_WIDE *get_eeprom() { return ((EEPROM_WIDE *)eeprom); }


  virtual PIR *get_pir1() { return (pir1); }
  virtual PIR *get_pir2() { return (pir2); }
  virtual PIR_SET *get_pir_set() { return (&pir_set_2_def); }
};

class P16F87 : public P16F8x
{
public:

  virtual PROCESSOR_TYPE isa(){return _P16F87_;};

  virtual unsigned int program_memory_size() const { return 0x1000; };

  P16F87(const char *_name=0, const char *desc=0);
  static Processor *construct(const char *name);
  virtual void create_sfr_map();
};

class P16F88 : public P16F87
{
public:


  ANSEL  ansel;
  ADCON0 adcon0;
  ADCON1 adcon1;
  sfr_register  adresh;
  sfr_register  adresl;

  virtual PROCESSOR_TYPE isa(){return _P16F88_;};

  virtual unsigned int program_memory_size() const { return 0x1000; };

  virtual void create();
  virtual void create_sfr_map();


  P16F88(const char *_name=0, const char *desc=0);
  ~P16F88();
  static Processor *construct(const char *name);
};

class P16F818 : public P16F81x
{
public:


  virtual PROCESSOR_TYPE isa(){return _P16F818_;};

  virtual unsigned int program_memory_size() const { return 0x400; };

  virtual void create();
  virtual void create_sfr_map();


  P16F818(const char *_name=0, const char *desc=0);
  static Processor *construct(const char *name);
};

class P16F819 : public P16F81x
{
public:



  virtual PROCESSOR_TYPE isa(){return _P16F819_;};

  virtual unsigned int program_memory_size() const { return 0x800; };

  virtual void create();
  virtual void create_sfr_map();


  P16F819(const char *_name=0, const char *desc=0);
  ~P16F819();
  static Processor *construct(const char *name);
};


#endif