⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 global.h

📁 实现快速傅立叶变换算法,provides test framwork for FFT testing
💻 H
📖 第 1 页 / 共 5 页
字号:
    #define MEM                         // Memory attribute to optimize speed and code of pointer access.
    #define HWACC                       // hardware access through external memory (i.e. CAN)

    #define REENTRANT
    #define PUBLIC

    #ifndef NDEBUG
        #include <stdio.h>                  // prototype printf() (for TRACE)
        #define TRACE  printf
    #endif


//---------------------------------------------------------------------------
//  definitions for Motorola PowerPC family 5x5 (555/565)
//  definitions Linux-PC
//---------------------------------------------------------------------------

#elif defined (__GNUC__)

    #if defined (LINUX) || defined (linux) || defined (__linux__)
        #define LINUX_SYSTEM            // define 'LINUX_SYSTEM' uniform for all Linux based systems
/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Anmerkung von -rs:  Es ist ok LINUX_SYSTEM f黵 alle Linux-Tagets zu definieren,
                    also auch f黵 den PC, da hiermit nur zus鋞zliche Parameter
                    an den Wrapper 黚ergeben werden, wie auf den Treiber zugegriffen
                    werden soll. Wenn das im Moment f黵 den PC nicht gebraucht wird,
                    dann kann das nur bedeuten, dass der Zugriff auf den Treiber
                    mit hart im Sourcecode vorgegebenen Parametern erfolgt, also
                    eigentlich unsch鰊 bzw. sogar falsch gehandhabt wird.


        #error "PLEASE READ COMMENT IN GLOBAL.H !!!"
        // r.d.: We will need an other solution here! There are two sections here which do check the preproc-definitions:
        //     LINUX and __linux__ . The first one was Linux for PC, the second one is this section for embedded Linux (MCF5xxx).
        //     But Linux for PC does not need the definitions for embedded Linux.
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
    #endif


    #ifdef PXROS
        #define TARGET_SYSTEM       _PXROS_
        #ifdef __i386__
            #undef LINUX // this define seems to be set from compiler
            #define DEV_SYSTEM      _DEV_HIGHTEC_X86_
	    #elif defined (__tricore__)
            #define DEV_SYSTEM      _DEV_GNU_TRICORE_
        #else // MPC5x5        
            #define DEV_SYSTEM      _DEV_GNU_MPC5X5_
        #endif

    #elif defined (LINUX) || defined (__linux__)
        #define TARGET_SYSTEM       _LINUX_     // Linux definition
        #define DEV_SYSTEM          _DEV_LINUX_

    #elif defined (GNU_CF5282)
        #define TARGET_SYSTEM       _NO_OS_
        #define DEV_SYSTEM          _DEV_GNU_CF5282_

    #elif defined (ECOSPRO_I386_PEAK_PCI)
        #define TARGET_SYSTEM       _ECOSPRO_
        #define DEV_SYSTEM          _DEV_GNU_I386_

    #elif defined (GNU_CF548X)
        #define TARGET_SYSTEM       _NO_OS_
        #define DEV_SYSTEM          _DEV_GNU_CF548X_
        
    #elif defined (GNU_ECOS_CF548X)
        #define TARGET_SYSTEM       _ECOS_
        #define DEV_SYSTEM          _DEV_ECOS_
    #else
        #error 'ERROR: DEV_SYSTEM not found!'
    #endif


    #ifndef QWORD
        #define QWORD long long int
    #endif

    #if (TARGET_SYSTEM == _PXROS_)

        #ifndef __KERNEL__
            #include <string.h>
        #endif


        #define NEAR                        // variables mapped to internal data storage location
        #define FAR                         // variables mapped to external data storage location
        #define CONST           const       // variables mapped to ROM (i.e. flash)
        #define ROM     /* to be defined */ // code or variables mapped to ROM (i.e. flash)
                                            // usage: CONST BYTE ROM foo = 0x00;
        #define LARGE                       // functions set parameters to external data storage location

        // These types can be adjusted by users to match application requirements. The goal is to
        // minimize code memory and maximize speed.
        #define GENERIC                     // generic pointer to point to application data
                                            // Variables with this attribute can be located in external
                                            // or internal data memory.
        #define MEM                         // Memory attribute to optimize speed and code of pointer access.

        #define HWACC                       // hardware access through external memory (i.e. CAN)

        #define REENTRANT
        #define PUBLIC

        #ifndef QWORD
            #define QWORD long long int
        #endif

        #ifndef NDEBUG
            #include <stdio.h>              // prototype printf() (for TRACE)
            #define TRACE  printf
        #endif

    #endif
    
    // ------------------ ECOS ------------------------------------------------------
    #if (TARGET_SYSTEM == _ECOS_)

        #ifndef __KERNEL__
            #include <string.h>
        #endif
        
        // Wanglei 20070903: INTERNAL_MEMORY_BASE defined here.
        #include <pkgconf/system.h>
        #include CYGHWR_MEMORY_LAYOUT_H
        #define INTERNAL_MEMORY_BASE  CYGMEM_REGION_devs

        #define NEAR                        // variables mapped to internal data storage location
        #define FAR                         // variables mapped to external data storage location
        #define CONST           const       // variables mapped to ROM (i.e. flash)
        #define ROM     /* to be defined */ // code or variables mapped to ROM (i.e. flash)
                                            // usage: CONST BYTE ROM foo = 0x00;
        #define LARGE                       // functions set parameters to external data storage location

        // These types can be adjusted by users to match application requirements. The goal is to
        // minimize code memory and maximize speed.
        #define GENERIC                     // generic pointer to point to application data
                                            // Variables with this attribute can be located in external
                                            // or internal data memory.
        #define MEM                         // Memory attribute to optimize speed and code of pointer access.

        #define HWACC                       // hardware access through external memory (i.e. CAN)

        #define REENTRANT
        #define PUBLIC

        #ifndef QWORD
            #define QWORD long long int
        #endif

        #ifndef NDEBUG
            #include <cyg/infra/diag.h>             // diag_printf              // prototype printf() (for TRACE)
            #define TRACE  //diag_printf
            
            #define ASSERT(p)  \
                if (p)         \
                {              \
                    ;          \
                }              \
                else           \
                {              \
                    diag_printf("Assert failed: " #p " (file %s line %d)\n", __FILE__, (int) __LINE__ ); \
                    while (1); \
                }
        #endif

    #endif
    
    
    
    // ------------------ GNUC for I386 ---------------------------------------------

    #if (TARGET_SYSTEM == _LINUX_) || (TARGET_SYSTEM == _ECOSPRO_)

        #ifndef __KERNEL__
            #include <string.h>
        #endif

        #define ROM                     // code or variables mapped to ROM (i.e. flash)
                                        // usage: CONST BYTE ROM foo = 0x00;
        #define HWACC                   // hardware access through external memory (i.e. CAN)

        // These types can be adjusted by users to match application requirements. The goal is to
        // minimize code memory and maximize speed.
        #define GENERIC                 // generic pointer to point to application data
                                        // Variables with this attribute can be located in external
                                        // or internal data memory.
        #define MEM                     // Memory attribute to optimize speed and code of pointer access.

        #ifndef NEAR
            #define NEAR                // variables mapped to internal data storage location
        #endif

        #ifndef FAR
            #define FAR                 // variables mapped to external data storage location
        #endif

        #ifndef CONST
            #define CONST const         // variables mapped to ROM (i.e. flash)
        #endif

        #define LARGE

        #define REENTRANT
        #define PUBLIC

        #ifndef NDEBUG
            #ifndef __KERNEL__
                #include <stdio.h>              // prototype printf() (for TRACE)
                #define TRACE  printf
            #else
                #define TRACE  printk
            #endif
        #endif
    #endif

    // ------------------ GNU without OS ---------------------------------------------

    #if (TARGET_SYSTEM == _NO_OS_)

        #define ROM                     // code or variables mapped to ROM (i.e. flash)
                                        // usage: CONST BYTE ROM foo = 0x00;
        #define HWACC                   // hardware access through external memory (i.e. CAN)

        // These types can be adjusted by users to match application requirements. The goal is to
        // minimize code memory and maximize speed.
        #define GENERIC                 // generic pointer to point to application data
                                        // Variables with this attribute can be located in external
                                        // or internal data memory.
        #define MEM                     // Memory attribute to optimize speed and code of pointer access.

        #ifndef NEAR
            #define NEAR                // variables mapped to internal data storage location
        #endif

        #ifndef FAR
            #define FAR                 // variables mapped to external data storage location
        #endif

        #ifndef CONST
            #define CONST const         // variables mapped to ROM (i.e. flash)
        #endif

        #define LARGE

        #define REENTRANT
        #define PUBLIC

        #ifndef NDEBUG
//            #include "xuartdrv.h"
            #include <stdio.h>              // prototype printf() (for TRACE)
            #define TRACE  printf
//            #define TRACE  mprintf
//            #ifndef TRACE
//                #define TRACE trace
//                void trace (char *fmt, ...);
//            #endif
        #endif

    #endif

//---------------------------------------------------------------------------
//  definitions for MPC565
//---------------------------------------------------------------------------
#elif __MWERKS__


#ifdef __MC68K__

    #define TARGET_SYSTEM = _MCF548X_
    #define DEV_SYSTEM      _DEV_MCW_MCF5XXX_

#else
    #define TARGET_SYSTEM = _MPC565_
    #define DEV_SYSTEM      _DEV_MCW_MPC5X5_
#endif

    #define NEAR                        // variables mapped to internal data storage location
    #define FAR                         // variables mapped to external data storage location
    #define CONST           const       // variables mapped to ROM (i.e. flash)
    #define ROM                         // code or variables mapped to ROM (i.e. flash)
                                        // usage: CONST BYTE ROM foo = 0x00;
    #define LARGE                       // functions set parameters to external data storage location

    // These types can be adjusted by users to match application requirements. The goal is to
    // minimize code memory and maximize speed.
    #define GENERIC                     // generic pointer to point to application data

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -