E

Error 1109 has not been defined hatası

Başlatan enesmturk, 26 Kasım 2012, 09:49:24

enesmturk

Merhaba PIC18F458 kullanıyorum ve keypad'i tanıma uygulamasında derleyici nedeniyle sürekli Header dosyasında DEFINE edilmiş Symbolleri define edilmemiş gibi hata veriyor. Kodlar şu şekilde;

keypad_kani.c

#include "C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\pic18.h"
#include "defs_kani.h"
#include "delay_kani.h"
#include "C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.h"
#include "C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\Globals_kani.h"

void keypad_read(){




   
   KEYPAD_SATIR1=0;
   KEYPAD_SATIR2=0;
   KEYPAD_SATIR3=0;
   DelayUs(5);
   if((KEYPAD_SUTUN1)&&(KEYPAD_SUTUN2)&&(KEYPAD_SUTUN3)){
      key_code=KEY_NULL;
      debounce_counter=DEBOUNCE_FACTOR;
      key_longpress_counter=KEY_LONGPRESS_FACTOR;
      keypress_flag=0;
      return;
   }

      key_code_old=key_code;
      key_code=KEY_NULL;

      KEYPAD_SATIR1=1;
        KEYPAD_SATIR3=1;
      KEYPAD_SATIR2=0;   //Orta satir kontrol ediliyor

      DelayUs(10);
      if(!KEYPAD_SUTUN4){
         key_code=KEY_STOP;
      }
      else if(!KEYPAD_SUTUN3){
         key_code=KEY_SCRSAVER;
      }
      else if(!KEYPAD_SUTUN2){
         key_code=KEY_ASTERISK;
         //Bu tus bosta simdilik
      }
      else if(!KEYPAD_SUTUN1){      //Satir,Sutun = 2,1
         key_code=KEY_ENTER;
      }

      KEYPAD_SATIR2 = 1;
      KEYPAD_SATIR3 = 1;
      KEYPAD_SATIR1 = 0;   // 1. satir kontrol ediliyor

      DelayUs(10);
      if(!KEYPAD_SUTUN4){
         key_code=KEY_ESCAPE;
      }
      else if(!KEYPAD_SUTUN3){
         key_code=KEY_KALIBRE;
      }
      else if(!KEYPAD_SUTUN2){
         key_code=KEY_RESET;
      }
      else if(!KEYPAD_SUTUN1){      //Satir,Sutun = 1,1
         key_code=KEY_LEFT;
      }


      KEYPAD_SATIR1=1;
      KEYPAD_SATIR2=1;   
        KEYPAD_SATIR3=0;   //Alt satir kontrol ediliyor
      DelayUs(10);
      
      if(!KEYPAD_SUTUN4){
         key_code=KEY_START;
      }
      else if(!KEYPAD_SUTUN3){
         key_code=KEY_UP;
      }
      else if(!KEYPAD_SUTUN2){
         key_code=KEY_DOWN;
      }
      else if(!KEYPAD_SUTUN1){      //Satir,Sutun = 3,1
         key_code=KEY_RIGHT;
      }

//      if((key_code==KEY_NULL) ||(key_code!=key_code_old)){      //Daha onemli bir tusa basilsiysa
      if(key_code!=key_code_old){      //Daha onemli bir tusa basilsiysa
         debounce_counter=DEBOUNCE_FACTOR;
         key_longpress_counter=KEY_LONGPRESS_FACTOR;
         keypress_flag=0;
      }
      else if(key_code!=KEY_NULL){   //Hala ayni tusa basili ise
         if(debounce_counter!=0){   //Hala debounce counter sifir olmamissa
            debounce_counter--;
/*            if(!debounce_counter){
               keypress_flag=1;
               key_longpress_counter--;
               key_longpress_waiter=0;
            }
*/         }
         else{
            keypress_flag=1;
            if(key_longpress_counter!=0){   //Debounce counter sifir olmus ama uzunlugu olculecek
               key_longpress_counter--;
            }
/*            key_longpress_waiter=0;
            if(key_longpress_waiter!=0){
               key_longpress_waiter--;
            }
            else{
               key_longpress_waiter=KEY_LONGPRESS_WAITER_200;
               key_longpress_counter--;
            }
*/         }
      }

   KEYPAD_SATIR1=1;
   KEYPAD_SATIR2=1;
   KEYPAD_SATIR3=1;

}


keypad_kani.h


#define KEY_NULL 0

#define KEY_LEFT 1
#define KEY_RESET 2
#define KEY_KALIBRE 3
#define KEY_ESCAPE 4

#define KEY_ENTER 5
#define KEY_ASTERISK 6
#define KEY_SCRSAVER 7
#define KEY_STOP 8

#define KEY_RIGHT 9
#define KEY_DOWN 10
#define KEY_UP 11
#define KEY_START 12

#define KEYPAD_TOPLAMSATIR      3
#define KEYPAD_TOPLAMSUTUN      4//Utb icin 4

#define KEYPAD_SATIR1         RD4      // Keypad uzerinde satir satir arama yapilacak
#define KEYPAD_SATIR2         RD5      // Keypad uzerinde satir satir arama yapilacak
#define KEYPAD_SATIR3         RD6      // Keypad uzerinde satir satir arama yapilacak

#define KEYPAD_SATIR1_TRIS      TRISD4   // Keypad pin directions
#define KEYPAD_SATIR2_TRIS      TRISD5   // Keypad pin directions
#define KEYPAD_SATIR3_TRIS      TRISD6   // Keypad pin directions

#define KEYPAD_SUTUN1         RA3      // Keypad uzerindeki satirin sutunu bulunacak
#define KEYPAD_SUTUN2         RA4      // Keypad uzerindeki satirin sutunu bulunacak
#define KEYPAD_SUTUN3         RA5      // Keypad uzerindeki satirin sutunu bulunacak
#define KEYPAD_SUTUN4         RC3      // Keypad uzerindeki satirin sutunu bulunacak

#define KEYPAD_SUTUN1_TRIS      TRISA3   // Keypad pin directions
#define KEYPAD_SUTUN2_TRIS      TRISA4   // Keypad pin directions
#define KEYPAD_SUTUN3_TRIS      TRISA5   // Keypad pin directions
#define KEYPAD_SUTUN4_TRIS      TRISC3   // Keypad pin directions

#define DEBOUNCE_FACTOR            (4*XTAL_FREQ_COEF)      //48ms olsun
//#define KEY_LONGPRESS_FACTOR      200
#define KEY_LONGPRESS_FACTOR      5000 //20071103_1433
//#define KEY_LONGPRESS_WAITER_200   4

void keypad_read();


Aldığım Hatalar;

CLEAN SUCCESSFUL (total time: 51ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `C:/Users/enesmturk/Desktop/Pic_trials_20090305_0057/End/End_Display_18F458/End_Display_18f458.X'
make  -f nbproject/Makefile-default.mk dist/default/production/End_Display_18f458.X.production.hex
make[2]: Entering directory `C:/Users/enesmturk/Desktop/Pic_trials_20090305_0057/End/End_Display_18F458/End_Display_18f458.X'
"C:\Program Files (x86)\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F458   -I "C:\Program Files (x86)\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/default/production/_ext/1472/delay_kani.o   ../delay_kani.c
"C:\Program Files (x86)\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F458   -I "C:\Program Files (x86)\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/default/production/_ext/1472/keypad_kani.o   ../keypad_kani.c
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:15:Error [1109] type mismatch in redeclaration of 'keypad_read'
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:21:Error [1105] symbol 'RD4' has not been defined
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:21:Error [1101] lvalue required
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:22:Error [1105] symbol 'RD5' has not been defined
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:22:Error [1101] lvalue required
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:23:Error [1105] symbol 'RD6' has not been defined
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:23:Error [1101] lvalue required
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:25:Error [1105] symbol 'RA3' has not been defined
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:25:Error [1105] symbol 'RA4' has not been defined
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:25:Error [1105] symbol 'RA5' has not been defined
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:36:Error [1105] symbol 'RD4' has not been defined
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:36:Error [1101] lvalue required
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:37:Error [1105] symbol 'RD6' has not been defined
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:37:Error [1101] lvalue required
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:38:Error [1105] symbol 'RD5' has not been defined
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:38:Error [1101] lvalue required
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:41:Error [1105] symbol 'RC3' has not been defined
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:44:Error [1105] symbol 'RA5' has not been defined
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:47:Error [1105] symbol 'RA4' has not been defined
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:51:Error [1105] symbol 'RA3' has not been defined
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:55:Error [1105] symbol 'RD5' has not been defined
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:55:Error [1101] lvalue required
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:56:Error [1105] symbol 'RD6' has not been defined
make[2]: *** [build/default/production/_ext/1472/keypad_kani.o] Error 3
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:56:Error [1101] lvalue required
C:\Users\enesmturk\Desktop\Pic_trials_20090305_0057\End\End_Display_18F458\keypad_kani.c:57:Error [1105] symbol 'RD4' has not been defined
make[2]: Leaving directory `C:/Users/enesmturk/Desktop/Pic_trials_20090305_0057/End/End_Display_18F458/End_Display_18f458.X'
make[1]: Leaving directory `C:/Users/enesmturk/Desktop/Pic_trials_20090305_0057/End/End_Display_18F458/End_Display_18f458.X'

BUILD FAILED (exit value 2, total time: 757ms)



Powered by EzPortal