MPLAB ? C32 C Compiler User’s Guide
_CP0_ REGISTER _ NAME _ FIELD _ NAME _MASK – the bits that are part of this field are set
_CP0_ REGISTER _ NAME _ FIELD _ NAME _LENGTH – the number of bits that this field occupies
For example the vector spacing field of the IntCtl register has the following defines:
#define _CP0_INTCTL_VS_POSITION 0x00000005
#define _CP0_INTCTL_VS_MASK 0x000003E0
#define _CP0_INTCTL_VS_LENGTH 0x00000005
4.7.4
CP0 Access Macros
When the CP0 register definitions header file is included from a C file, CP0 access
macros are defined. Each CP0 register may have up to six different access macros
defined:
_CP0_GET_ REGISTER _ NAME ()
_CP0_SET_ REGISTER _ NAME (val)
_CP0_XCH_ REGISTER _ NAME (val)
_CP0_BIS_ REGISTER _ NAME (set)
_CP0_BIC_ REGISTER _ NAME (clr)
_CP0_BCS_ REGISTER _ NAME (clr, set)
Returns the value for register, REGISTER _ NAME .
Sets the register, REGISTER _ NAME , to val, and
returns void. Only defined for registers that
contain a writable field.
Sets the register, REGISTER _ NAME , to val, and
returns the previous register value. Only
defined for registers that contain a writable
field.
Sets the register, REGISTER _ NAME , to
(reg |= set), and returns the previous register
value. Only defined for registers that contain
writable bit fields.
Sets the register, REGISTER _ NAME , to
(reg &= ~clr), and returns the previous
register value. Only defined for registers that
contain writable bit fields.
Sets the register, REGISTER _ NAME , to
(reg = (reg & ~clr) | set), and returns the
previous register value. Only defined for
registers that contain writable bit fields.
4.8
CONFIGURATION BIT ACCESS
4.8.1
#pragma config
The #pragma config directive specifies the processor-specific configuration settings
(i.e., configuration bits) to be used by the application. Refer to the “ PIC32MX
Configuration Settings ” on-line help for more information.
Configuration settings may be specified with multiple #pragma config directives.
MPLAB C32 C compiler verifies that the configuration settings specified are valid for
the processor for which it is compiling. If a given setting in the configuration word has
not been specified in any #pragma config directive, the bits associated with that
setting default to the unprogrammed value.
For each configuration word for which a setting is specified with the #pragma config
directive, the compiler generates a read-only data section named .config_ address ,
where address is the hexadecimal representation of the address of the configuration
word. For example, if a configuration setting was specified for the configuration word
located at address 0xBFC02FFC , a read-only data section named
. config_BFC02FFC would be created.
DS51686A-page 54
? 2007 Microchip Technology Inc.
相关PDF资料
SW300003-EVAL LIBRARY SOFT MODEM-EVAL ONLY
SW300010-EVAL SPEECH RECOG LIBRARY-EVAL ONLY
SW300040-EVAL LIBRARY NOISE SUPPR-EVAL ONLY
SW300060-EVAL LIBRARY ACOUSTIC ECHO-EVAL ONLY
SW300070-EVAL SOFTWARE LIBR ENC/DEC EVAL ONLY
SW500012 HI-TECH C PRO FOR PIC32
SY87701LHI-EVAL BOARD EVAL SY87701 EXPERIMENT
SY87729LHI-EVAL BOARD EVAL N SY87729 EXPERIMENT
相关代理商/技术参数
SW006021-1 制造商:Microchip Technology 功能描述:MPLAB XC8 STANDARD COMPILER 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 STD 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 STANDARD 制造商:Microchip Technology Inc 功能描述:COMPILER, MPLAB XC8, STANDARD 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 ANSI C Compiler for the PIC10 (12),(16),(18) (Workstation License) 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 Standard Compiler 制造商:Microchip Technology Inc 功能描述:OPTOCOUPLERS; Core Architecture:PIC; Software Edition:Standard
SW006021-1N 制造商:Microchip Technology 功能描述:MPLAB XC8 STANDARD COMPILER (F 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 STANDARD COMPILER (FLOATING LICENSE) - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 STD FLOAT LIC 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 Standard Compiler (Fltng Lic)
SW006021-2 制造商:Microchip Technology 功能描述:MPLAB XC8 PRO COMPILER WORKSTATION LICENSE 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 PRO COMPILER - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 PRO 制造商:Microchip Technology Inc 功能描述:COMPILER, MPLAB XC8, PRO 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 ANSI PRO Compiler for the PIC10 (12),(16),(18) (Workstation License) 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 PRO Compiler 制造商:Microchip Technology Inc 功能描述:SOFTWARE TOOL, MPLAB XC8 PRO COMPILER; Core Architecture:PIC; Supported Families:PIC10, PIC16, PIC18; Software Edition:Linux; License Type:Floating - node; No. of User Licenses:1; Supported Hosts:-
SW006021-2C 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 PRO CHI
SW006021-2N 功能描述:开发软件 MPLAB XC8 PRO Compiler (Fltng Lic) RoHS:否 制造商:Atollic Inc. 产品:Compilers/Debuggers 用于:ARM7, ARM9, Cortex-A, Cortex-M, Cortex-R Processors
SW006022-1 制造商:Microchip Technology 功能描述:MPLAB XC16 STANDARD COMPILER 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 STANDARD COMPILER - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC16 STD 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC16 STANDARD 制造商:Microchip Technology Inc 功能描述:COMPILER, MPLAB XC16, STANDARD 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 Standard Compiler (Workstation License) 制造商:Microchip Technology Inc 功能描述:OPTOCOUPLERS; Core Architecture:PIC, dsPIC; Software Edition:Standard
SW006022-1N 制造商:Microchip Technology 功能描述:MPLAB XC16 STANDARD COMPILER ( 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 STANDARD COMPILER (FLOATING LICENSE) - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC16 FLOAT LIC 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 Standard Compiler (Fltng Lic)
SW006022-2 功能描述:开发软件 MPLAB XC16 PRO Compiler RoHS:否 制造商:Microchip Technology 产品: 用于: