-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdevincs.h
More file actions
107 lines (75 loc) · 3.33 KB
/
devincs.h
File metadata and controls
107 lines (75 loc) · 3.33 KB
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
/*
Copyright (C) Pete Brownlow 2014-2017 software@upsys.co.uk
devincs.h - PIC processor and family related definitions - part of CBUS libraries for PIC 18F
This work is licensed under the:
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
To view a copy of this license, visit:
http://creativecommons.org/licenses/by-nc-sa/4.0/
or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
License summary:
You are free to:
Share, copy and redistribute the material in any medium or format
Adapt, remix, transform, and build upon the material
The licensor cannot revoke these freedoms as long as you follow the license terms.
Attribution : You must give appropriate credit, provide a link to the license,
and indicate if changes were made. You may do so in any reasonable manner,
but not in any way that suggests the licensor endorses you or your use.
NonCommercial : You may not use the material for commercial purposes. **(see note below)
ShareAlike : If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions : You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
** For commercial use, please contact the original copyright holder(s) to agree licensing terms
This software 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
**************************************************************************************************************
Note: This source code has been written using a tab stop and indentation setting
of 4 characters. To see everything lined up correctly, please set your
IDE or text editor to the same settings.
******************************************************************************************************
For library version number and revision history see CBUSLib.h
*/
#ifndef DEVINCS_H
#define DEVINCS_H
#ifdef __cplusplus
extern "C" {
#endif
// Include the appropriate definition file for the processor that has been selected for this project
#ifdef __XC8__
#include <xc.h>
#else
#include <p18cxxx.h>
#endif
// Set CPUF to the PIC18 series family, so that we can do conditional assembly for the k series and original PIC18 processors
// This is defined only for the CAN processors at present
#if defined(__18F25K80) || defined(__18F26K80) || defined(__18F45K80) || defined(__18F46K80)|| defined(__18F65K80) || defined(__18F66K80)
#define CPUF18K
#else
#define CPUF18F
#endif
// Define the amount of EEPROM available
#if defined(__18F2480) || defined(__18F2580)
#define EE256
#else
#define EE1024
#endif
// Set CPU code for CBUS parameter block
#if defined(__18F25K80)
#define CPU P18F25K80
#endif
#if defined(__18F26K80)
#define CPU P18F26K80
#endif
#if defined(__18F2580)
#define CPU P18F2580
#endif
#if defined(__18F2585)
#define CPU P18F2585
#endif
#if defined(__18F2680)
#define CPU P18F2680
#endif
#ifdef __cplusplus
}
#endif
#endif /* DEVINCS_H */