22.4.3 Processor-Specific Macros
The proc/p*.h header files define a number of processor-specific macros. To use
these macros, #include <xc.h>
in your source file. This list is not
comprehensive.
__PIC32_HAS_L1CACHE |
Defined if and only if the target device supports an L1 cache |
__PIC32_HAS_MIPS32R2 |
Defined if and only if the target device supports the MIPS32r2 Instruction Set |
__PIC32_HAS_MICROMIPS |
Defined if and only if the target device supports the microMIPS32 Instruction Set |
__PIC32_HAS_MIPS16 |
Defined if and only if the target device supports the MIPS16 Instruction Set |
__PIC32_HAS_DSPR2 |
Defined if and only if the target device supports the DSP-enhanced core |
__PIC32_HAS_FPU64 |
Defined if and only if the target device
supports the 64-bit Hardware Floating-Point Unit.
Also check __mips_hard_float to
determine if the compiler is set to compile for
the FPU. |
_<Interrupt-Source>_VECTOR |
Defined to the vector number for the
interrupt source and intended to be used with the
vector function attribute. for example,
#define _CORE_TIMER_VECTOR
0 |
_<Interrupt-Source>_IRQ |
Defined to the IRQ number for the interrupt
source. for example, #define
_CORE_SOFTWARE_0_IRQ 1 |
_<SFR>_<Bitfield>_POSITION |
Defined to the position of a bitfield
within a special function register (SFR). for
example, #define _WDTCON_ON_POSITION
0x0000000F |
_<SFR>_<Bitfield>_MASK |
Defined to a mask of the bitfield within a
special function register (SFR). for example,
#define _WDTCON_ON_MASK
0x00008000 |
_<SFR>_<Bitfield>_LENGTH |
Defined to the length of the bitfield
within a special function register (SFR). for
example, #define _WDTCON_ON_LENGTH
0x00000001 |
<Special-Function-Register> |
Defined to the Special Function Register
name. for example, #define T5CON
T5CON This macro allows preprocessor testing for the existence of an SFR before using it. For example:
|