Microchip Technology SW006023-2N Ficha De Dados

Página de 238
Device-Related Features
 2012 Microchip Technology Inc.
DS51686E-page 87
4.4.1.1
SYNTAX
The following shows the meta syntax notation for the different forms the pragma may 
take.
pragma-config-directive:
     # pragma config 
setting-list
setting-list:
     setting
   | setting-listsetting
setting
:
     setting-name = value-name
The setting-name and value-name are device specific and can be determined by 
utilizing the PIC32MX Configuration Settings document.
All #pragma config directives should be placed outside of a function definition as 
they do not define executable code.
4.4.1.2
EXAMPLE
The following example shows how the #pragma config directive might be utilized. 
The example does the following:
• Enables the Watchdog Timer
• Sets the Watchdog Postscaler to 1:128
• Selects the HS Oscillator for the Primary Oscillator
#pragma config FWDTEN = ON, WDTPS = PS128
#pragma config POSCMOD = HS
...
int main (void)
{
...
}