From f69851a8f37adec2d9e5717ec79b56523e19c2e2 Mon Sep 17 00:00:00 2001 From: "K.Ohta" Date: Wed, 12 Jun 2013 05:07:41 +0900 Subject: [PATCH] [General] Replace config words "__at()" to "#pragma config". --- main.c | 30 ++++++++++++++++++------------ nbproject/Makefile-genesis.properties | 2 +- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/main.c b/main.c index fe4e1be..7c8a0d6 100644 --- a/main.c +++ b/main.c @@ -5,7 +5,6 @@ * License: GPL2+LE */ -#pragma stack 0x200 256 // Set stack size to 256bytes. #include #include #include @@ -25,17 +24,24 @@ /* * Config words. */ -__at(__CONFIG1H) _config1h = _FOSC_INTIO67_1H; -__at(__CONFIG2L) _config2l = _BORV_190_2L & _BOREN_ON_2L & _PWRTEN_ON_2L; -__at(__CONFIG2H) _config2h = _WDTEN_ON_2H & _WDTPS_32768_2H; -__at(__CONFIG3H) _config3h = _PBADEN_OFF_3H & _MCLRE_EXTMCLR_3H; -__at(__CONFIG4L) _config4l = _STVREN_ON_4L & _LVP_OFF_4L & _XINST_ON_4L & _DEBUG_ON_4L; -__at(__CONFIG5L) _config5l = _CP0_OFF_5L & _CP1_OFF_5L; -__at(__CONFIG5H) _config5h = _CPB_OFF_5H & _CPD_OFF_5H; -__at(__CONFIG6L) _config6l = _WRT0_OFF_6L & _WRT1_OFF_6L; -__at(__CONFIG6H) _config6h = _WRTD_OFF_6H & _WRTB_OFF_6H & _WRTC_OFF_6H; -__at(__CONFIG7L) _config7l = _EBTR0_OFF_7L & _EBTR1_OFF_7L; -__at(__CONFIG7H) _config7h = _EBTRB_OFF_7H; +#pragma stack 0x200 256 // Set stack size to 256bytes. +#pragma config FOSC=INTIO67,BORV=190,BOREN=ON,PWRTEN=ON +#pragma config WDTEN=ON,WDTPS=32768 +#pragma config PBADEN=OFF,MCLRE=EXTMCLR,STVREN=ON,LVP=OFF,DEBUG=ON//,XINST=ON +#pragma config CP0=OFF,CP1=OFF,CPB=OFF,CPD=OFF +#pragma config WRT0=OFF,WRT1=OFF,WRTB=OFF,WRTC=OFF,WRTD=OFF +#pragma config EBTR0=OFF,EBTR1=OFF,EBTRB=OFF +//__at(__CONFIG1H) _config1h = _FOSC_INTIO67_1H; +//__at(__CONFIG2L) _config2l = _BORV_190_2L & _BOREN_ON_2L & _PWRTEN_ON_2L; +//__at(__CONFIG2H) _config2h = _WDTEN_ON_2H & _WDTPS_32768_2H; +//__at(__CONFIG3H) _config3h = _PBADEN_OFF_3H & _MCLRE_EXTMCLR_3H; +//__at(__CONFIG4L) _config4l = _STVREN_ON_4L & _LVP_OFF_4L & _XINST_ON_4L & _DEBUG_ON_4L; +//__at(__CONFIG5L) _config5l = _CP0_OFF_5L & _CP1_OFF_5L; +//__at(__CONFIG5H) _config5h = _CPB_OFF_5H & _CPD_OFF_5H; +//__at(__CONFIG6L) _config6l = _WRT0_OFF_6L & _WRT1_OFF_6L; +//__at(__CONFIG6H) _config6h = _WRTD_OFF_6H & _WRTB_OFF_6H & _WRTC_OFF_6H; +//__at(__CONFIG7L) _config7l = _EBTR0_OFF_7L & _EBTR1_OFF_7L; +//__at(__CONFIG7H) _config7h = _EBTRB_OFF_7H; diff --git a/nbproject/Makefile-genesis.properties b/nbproject/Makefile-genesis.properties index 6e9f330..8ae865e 100644 --- a/nbproject/Makefile-genesis.properties +++ b/nbproject/Makefile-genesis.properties @@ -1,5 +1,5 @@ # -#Tue Jun 11 15:55:08 JST 2013 +#Wed Jun 12 04:27:17 JST 2013 default.languagetoolchain.dir=/usr/local/bin default.br-unifei-rmaalmeida-toolchainSDCC-SDCCtoolchain.md5=b67cce1ad75b450308d7806e430931b3 com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=8fe1589514540343a5279c082104bce0 -- 2.11.0