#ifndef __CONFIG_H__ #define __CONFIG_H__ #define AW_ATSC_5X 1 //判断是否定义美国或者全波版本(5K+) #if USA_ATSC_5X #define USA_ATSC_5X 1 #else #define USA_ATSC_5X 0 #endif #if AW_ATSC_5X #define AW_ATSC_5X 1 #else #define AW_ATSC_5X 0 #endif #if USA_ATSC_5X && AW_ATSC_5X #error "Only could define one exciter type!!!" #endif #if (USA_ATSC_5X==0) && (AW_ATSC_5X==0) #error "Must define The exciter type!!!" #endif #define xQueueHandle int* #define tskIDLE_PRIORITY 1 #ifndef USE_HW_REPT #define USE_HW_REPT 0 #endif #if 1 #define USE_DRY_LOOP 0 //@NOT_USED #endif //------------------usr-define------------------------ //测试用-发布时需要开放 #define USE_DBG_PASS_TUNER_INIT 0 //跳过tuner init #define USE_UART_DEV_LINK 1 /* * Prefer the local key/LCD path when the single-core CPU is busy with IQ * analysis. Set to 0 to restore the original thread priorities. */ #define USE_UI_RESPONSE_PRIORITY 1 /* * Keep the physical RF output muted while FPGA/ADRV9009/JESD/DPD are being * initialized. The saved/user-requested RF state is restored only after the * whole RF chain is ready, avoiding boot transients at the output. */ #define USE_DELAYED_RF_ENABLE 1 #define RF_BOOT_STABLE_DELAY_MS 2000 //--------------------------------------------------- //if use korea -- need check ca //V173 //else use us -- ca default bypass #define USE_KOREA_VERSION (0) //#define SPL_CURV_LOAD_STORE 0 #if USA_ATSC_5X #if USE_HW_REPT #define SW_VERSION "V6.1A_150107T" #else #define SW_VERSION "V6.1A_150107" #endif #define ERR_TO_LCM 1 #define USE_DRYLOOP_I2C 0 //美国5K+,暂时使用串口模式 #define USE_TUNER_88436 1 //TUNER88436 外部解码 tuner18273 需要fpga解码,18273只是个高频头 #define USE_TUNER_18273 0 //两个只能同时使用1个 #define USE_PSTS 0 #define USE_NEW_DIO_MODE 0 //是否使用美国新的dio模式 在原先的dio基础上对部分按键做了重定义 #elif AW_ATSC_5X #if USE_HW_REPT #undef USE_DBG_PASS_TUNER_INIT #define USE_DBG_PASS_TUNER_INIT (1) #define SW_VERSION "V5.2AW_210902T" //"V5.2AW_210822T" #else #define SW_VERSION "V5.2AW_220331R" //"V5.2AW_211217" #endif #define ERR_TO_LCM 1 #define USE_DRYLOOP_I2C 0 #define USE_TUNER_88436 0 #define USE_TUNER_18273 0 //三个只能同时使用1个,或者不用 #define USE_PSTS 1 #define USE_NEW_DIO_MODE 1 //是否使用美国新的dio模式 在原先的dio基础上对部分按键做了重定义 #endif #define USE_STD_USART_SEND_RECV 1 /*开启该功能时,需要调整网页ADPC的选项*/ #define USE_UPDATA5 0//禁用 #define USE_RESET_TCP (1)//重置tcp #define USE_UART_CMD_PRINT_LWIP (1)//串口命令可以打印:80 46 06 70 3C 96 //调试使用 #define DBG_ADPC_NO_FEEDBACK_ERR 0 //------------------<<<<<<<<<<------------------------ #define ATSC_TITLE_LEN 16 #define ATSC_WEB_TITLE "Digital Exciter" #define SNTP_TIME_STRING_LEN 8 #define SNTP_DATE_STRING_LEN 10 #define I2C_MAX_NUM 5 #define DEBUG_AUTO_ADPC 0 #define ATSC_USA_AMP 1 //@TO_DISABLE #define I2C_SOFT_GPIO 0 //只能为1 #define USE_SONYCXD6801GL 1 #if ((USE_TUNER_18273==1)&&(USE_TUNER_88436==1)) || ((USE_TUNER_18273==1)&&(USE_SONYCXD6801GL==1)) || ((USE_TUNER_88436==1)&&(USE_SONYCXD6801GL==1)) #error "must choose only one tuner type!" #endif #if (USE_TUNER_18273==1)||(USE_TUNER_88436==1)||(USE_SONYCXD6801GL==1) #define USE_TUNER 1 //1 #else #define USE_TUNER 0 #endif //++++++++++++++++++++++++++++++++++++++++++ #if 1//usr_def #define TMP_DISABLE_BOOT_SNR_UPDATE (0) #define DBG_DISABLE_I2C (0) #define DBG_DISABLE_TUNER (0) #if DBG_DISABLE_TUNER #ifdef USE_TUNER #undef USE_TUNER #define USE_TUNER (0) #endif #endif #define DBG_I2C_ERR_DELAY 1 //#define USE_TUNER 1 //暂时先关闭 #define THR_GPS 0 #define THR_LCD 1 //+++++++++++++++++++++++++++++++++++++++++++ #define NO_USE 0 //@NOT_USED #define ETH_UPGRADE 0 /*#ifndef ETH_UPGRADE //默认打开升级模式 #define ETH_UPGRADE 1 #else #define ETH_UPGRADE 0 #endif*/ #define TMP_UNUSE_LCD 1 //@NOT_USED //#define USE_GPS 1 #define USE_GPS 1 //@TMP_UNUSED_FOR_MAKE #define TMP_UNUSE_GPS_TIME 0 //@TMP_UNUSED_FOR_MAKE #define NEED_TO_EN 0 //NEED_TO_EN #define FPGA_UP_MSG 1 #define NEED_SEND_ALM 0 //对于5段地址冲突的部分需要禁用 #define ADDR_CONFLICT_DISABLED 1 #define DBG_PR_FSSI_FWD (0) #endif//usr_def //+++++++++++++++++++++++++++++++++++++++ #define SYSTICKHZ (configTICK_RATE_HZ) #define SYSTICKMS (1000 / configTICK_RATE_HZ) #define E2_ROM_SIZE (32*1024) // e2rom 32Kbyte #define E2_ROM_PAGE (64) // e2rom 页 #define USE_SWAP_DATA 1 #define USE_SPI_FLASH 1 //flash开关 #define SHOW_DEBUG_INFO 0 #define TEST_E2_ROM 0 #define SCAN_NEED_CHANGE_MODE 0 #define USE_CTRL_MODE 1 #define USE_HTTP_LOGIN 1 #define USE_TCP_COMM 1 //网络通讯 #define USE_NEW_FPGA 1 #define USE_LCD_CACHE 1 #define USE_BIG_LCD 1 #define USE_HTTP 1 #define FPGA_UPGRADE 1 #define USE_SNR_ADJ 1 #define UPGRADE_LISTEN_PORT 1234 #define TCP_COMM_PORT 4003 #define TCP_COMM_DATA_PORT 4017 #define SYSTICK_INT_PRIORITY 0x80 #define ETHERNET_INT_PRIORITY 0xC0 #define ALARM_USE_UDP 1 //那个版本以后,待定 /////////////////////////////////////////////////////////////////////////// //#define USE_NLOGO_VER 0 //对于正式发布的atsc5x+需要配0 /*#if USE_NLOGO_VER #define TEMPREATURE_DEGREE 1 //温度 #else #define TEMPREATURE_DEGREE 0 //温度 #endif**/ //系统组件配置 #define USE_SPECT_DATA_TASK 1 // 是否需要通过tcp向上位机传送数据 8000型有此功能 #define USE_ADPC_LONG 1 // 预校正加长代码 #define USE_NEW_AGC 0 #define USE_TS_CHECK 1 #define USE_GPS_UBLOX6 1 #define USE_GPS_CHECK 1 #define USE_TS2IP 1 #define USE_SNTP_SNYC_TIME 1 #define USE_TEMPERATURE_CHECK 1 #define USE_OVERFLOW_CHECK 1 #define USE_NETWORK_DNS 0 // 是否配置dns #define USE_NEW_POWER_CFG 1 // HMC472 + ADRV9009 power allocation #define USE_FREQ_CHANGE_RESET_PWR 1 // 切换频点后是否先将输出功率降到-25dB #if USE_BIG_LCD #define LCD_CHAR_NUM 40 #else #define LCD_CHAR_NUM 20 #endif #define TEST_GPS_MOUDLE 1 // RF 相关注释 #define setbit(x,y) (x)= (1<<(y)) //将X的第Y位置1,清其他位, #define setbits(x,y) (x)|=(1<<(y)) //将X的第Y位置1,保留其他位, #define clrbit(x,y) (x)&=~(1<<(y)) //将X的第Y位清0, #define clrbits(x,y,z) (x)&=~((z)<<(y)) //从Y位开始,以Z为整体对X某些位清0, #define _STATUS_RF 0 //Bit0=1无输出 为0正常 串口返回时 单独 "或1" 处理, #define _KEY_RF 1 //Bit 1 #define _KEY_WH 2 //Bit 2 #define _KEY_TX 2 //Bit 2 #define _LOCAL_REMOET 2 //Bit 2 #define _PIN_DRYLOOP 3 #define _MISS_OTHER 4 #define _MISS_TS 5 #define _MISS_10M 6 #define _MISS_1PPS 7 #define MAC_DEFAULT (0x13<<16) | (0x05<<8) | (0x03) #define BAK_PARA_CHECK 1 #define DEBUG_ERR_CHECK 0 // WC屏参数激励器不试用,可用来调试 //Bit 0 为0时正常,为1时不正常 #define BAK_ERR_OK 0 #define BAK_ERR_ERR 1 #define BAK_ERR_TXFREQ 1<<1 #define BAK_ERR_RXFREQ 1<<2 #define BAK_ERR_POWER 1<<3 #define BAK_ERR_DB 1<<4 #define BAK_ERR_WE_LEAK 1<<5 #define BAK_ERR_DEBUG 1<<7 #define LEN_ADPC_DATE_BUF 4096 //#define ADPC_DEBUG 1 #endif /************************************END********************************/