1 Reply Latest reply on Oct 20, 2015 3:02 AM by user_1377889

    puzzles about code  in fx2regs.h

    naruto4219_1503096

      #ifdef ALLOCATE_EXTERN
      #define EXTERN
      #define _AT_ _at_
      #else
      #define EXTERN extern
      #define _AT_ ;/ ## /
      #endif

         

         

      EXTERN xdata volatile BYTE GPIF_WAVE_DATA    _AT_ 0xE400;
      EXTERN xdata volatile BYTE RES_WAVEDATA_END  _AT_ 0xE480;

         

      // General Configuration

         

      EXTERN xdata volatile BYTE CPUCS             _AT_ 0xE600;  // Control & Status
      EXTERN xdata volatile BYTE IFCONFIG          _AT_ 0xE601;  // Interface Configuration
      EXTERN xdata volatile BYTE PINFLAGSAB        _AT_ 0xE602;  // FIFO FLAGA and FLAGB Assignments
      EXTERN xdata volatile BYTE PINFLAGSCD        _AT_ 0xE603;  // FIFO FLAGC and FLAGD Assignments
      EXTERN xdata volatile BYTE FIFORESET         _AT_ 0xE604;  // Restore FIFOS to default state

         

       

         

      I do not get it about "#define _AT_ ;/ ## /".If the file is first used or included,the ALLOCATE_EXTERN is not defined,the program will jump to "#define EXTERN extern".However ,"#define _AT_ ;/ ## /" will not make _AT_ function as the _at_ in keil.Somebody could explain this for me? Thank you so much.