这个是头文件里对寄存器设置的描述
extern __attribute__((space(prog))) int _FDS;
#define _FDS(x) __attribute__((section("__FDS.sec"),space(prog))) int _FDS = (x);
/*
** Only one invocation of FDS should appear in a project,
** at the top of a C source file (outside of any function).
**
** The following constants can be used to set FDS.
** Multiple options may be combined, as shown:
**
** _FDS( OPT1_ON & OPT2_OFF & OPT3_PLL )
**
** Deep Sleep Watchdog Timer:
** DSWDTEN_OFF Disabled
** DSWDTEN_ON Enabled
**
** Deep Sleep BOR:
** DSBOREN_OFF Disabled
** DSBOREN_ON Enabled
**
** RTCC Reference Oscillator Select:
** RTCOSC_LPRC Low Power RC Oscillator (LPRC)
** RTCOSC_SOSC Secondary Oscillator (SOSC)
**
** Deep Sleep Watchdog Oscillator Clock Select:
** DSWDTOSC_LPRC Secondary Oscillator (SOSC)
** DSWDTOSC_SOSC Low Power RC Oscillator (LPRC)
**
** Deep Sleep Watchdog Postscale Select Bits:
** DSWDTPS_DSWDTPS0 1:2 (2.1 ms)
** DSWDTPS_DSWDTPS1 1:8 (8.3 ms)
** DSWDTPS_DSWDTPS2 1:32 (33 ms)
** DSWDTPS_DSWDTPS3 1:128 (132 ms)
** DSWDTPS_DSWDTPS4 1:512 (528 ms)
** DSWDTPS_DSWDTPS5 1:2048 (2.1 Seconds)
** DSWDTPS_DSWDTPS6 1:8192 (8.5 Seconds)
** DSWDTPS_DSWDTPS7 1:32,768 (34 Seconds)
** DSWDTPS_DSWDTPS8 1:131,072 (135 Seconds)
** DSWDTPS_DSWDTPS9 1:524,288 (9 Minutes)
** DSWDTPS_DSWDTPSA 1:2,097,152 (36 Minutes)
** DSWDTPS_DSWDTPSB 1:8,388,608 (2.4 Hours)
** DSWDTPS_DSWDTPSC 1:33,554,432 (9.6 Hours)
** DSWDTPS_DSWDTPSD 1:134,217,728 (38.5 Hours)
** DSWDTPS_DSWDTPSE 1:536,870,912 (6.4 Days)
** DSWDTPS_DSWDTPSF 1:2,147,483,648 (25.7 Days)
**
*/
#define DSWDTEN_OFF 0xFF7F
#define DSWDTEN_ON 0xFFFF
#define DSBOREN_OFF 0xFFBF
#define DSBOREN_ON 0xFFFF
#define RTCOSC_LPRC 0xFFDF
#define RTCOSC_SOSC 0xFFFF
#define DSWDTOSC_LPRC 0xFFEF
#define DSWDTOSC_SOSC 0xFFFF
#define DSWDTPS_DSWDTPS0 0xFFF0
#define DSWDTPS_DSWDTPS1 0xFFF1
#define DSWDTPS_DSWDTPS2 0xFFF2
#define DSWDTPS_DSWDTPS3 0xFFF3
#define DSWDTPS_DSWDTPS4 0xFFF4
#define DSWDTPS_DSWDTPS5 0xFFF5
#define DSWDTPS_DSWDTPS6 0xFFF6
#define DSWDTPS_DSWDTPS7 0xFFF7
#define DSWDTPS_DSWDTPS8 0xFFF8
#define DSWDTPS_DSWDTPS9 0xFFF9
#define DSWDTPS_DSWDTPSA 0xFFFA
#define DSWDTPS_DSWDTPSB 0xFFFB
#define DSWDTPS_DSWDTPSC 0xFFFC
#define DSWDTPS_DSWDTPSD 0xFFFD
#define DSWDTPS_DSWDTPSE 0xFFFE
#define DSWDTPS_DSWDTPSF 0xFFFF