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

📄 init.c

📁 MMI层OBJ不能完全编译
💻 C
📖 第 1 页 / 共 5 页
字号:
/*
 * INIT.C
 *
 * This module allows to initialize the board:
 *     - wait states,
 *     - unmask selected interrupts,
 *     - initialize clock,
 *     - disable watchdog.
 * Dummy functions used by the EVA3 library are defined.
 */

/* Config Files */

#pragma DUPLICATE_FOR_INTERNAL_RAM_START

#ifndef PSP_FAILSAFE
#define PSP_FAILSAFE 0
#warn "PSP Failsafe Flag Not Defined in your Build, taking default"
#endif


#ifndef _WINDOWS
  #include "l1sw.cfg"
  #include "rf.cfg"
  #include "chipset.cfg"
  #include "board.cfg"
  #include "swconfig.cfg"
  #if (OP_L1_STANDALONE == 0)
    #include "rv.cfg"
    #include "sys.cfg"
    #include "debug.cfg"
    #ifdef BLUETOOTH_INCLUDED
      #include "btemobile.cfg"
    #endif
    #ifdef BLUETOOTH
      #include "bluetooth.cfg"
    #endif
  #endif

  #if (OP_L1_STANDALONE == 0)
    #include "rv/rv_defined_swe.h"
  #endif
#endif

/* Include Files */
#include <assert.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>

#include "nucleus.h"

#include "sys_types.h"
#include "l1_types.h"
#include "l1_confg.h"
#include "l1_const.h"
#include "pin_config.h" // added for Init tuned to Power Management
//fangcj add
#include "uart.h"
#if TESTMODE
  #include "l1tm_defty.h"
#endif // TESTMODE

#if (AUDIO_TASK == 1)
  #include "l1audio_const.h"
  #include "l1audio_cust.h"
  #include "l1audio_defty.h"
#endif // AUDIO_TASK

#if (L1_GTT == 1)
  #include "l1gtt_const.h"
  #include "l1gtt_defty.h"
#endif

#if (L1_MP3 == 1)
  #include "l1mp3_defty.h"
#endif

#if (L1_MIDI == 1)
  #include "l1midi_defty.h"
#endif

#if (L1_AAC == 1)
  #include "l1aac_defty.h"
#endif
#if (L1_DYN_DSP_DWNLD == 1)
  #include "l1_dyn_dwl_defty.h"
#endif

#if (TRACE_TYPE == 4)
  #include "l1_defty.h" 
#endif


#if ((OP_L1_STANDALONE == 1) && (CODE_VERSION != SIMULATION) && (PSP_STANDALONE == 0))

  #if (AUDIO_TASK == 1)
    #include "l1audio_signa.h"
    #include "l1audio_msgty.h"
  #endif // AUDIO_TASK

  #if (L1_GTT == 1)
    #include "l1gtt_signa.h"
    #include "l1gtt_msgty.h"
  #endif

  #include "l1_defty.h"
  #include "cust_os.h"
  #include "l1_msgty.h"
  #include "nu_main.h"
  #include "l1_varex.h"
  #include "l1_proto.h"
  #include "hw_debug.h"
  #include "l1_trace.h"

#endif   /* ((OP_L1_STANDALONE == 1) && (CODE_VERSION != SIMULATION) && (PSP_STANDALONE==0)) */


#include "armio/armio.h"
#include "timer/timer.h"

#if (CHIPSET==15)
#include "types.h"
#include "bspI2c.h"
#include "bspTwl3029.h"
#include "bspTwl3029_I2c.h"
#include "bspTwl3029_Power.h"
#if (OP_L1_STANDALONE == 0)
  #include "uicc/board/bspUicc.h"
#endif
#endif

#if (OP_L1_STANDALONE == 0)
  #include "rvf/rvf_api.h"
  #include "rvm/rvm_api.h"  /* A-M-E-N-D-E-D!	*/
  #include "sim/sim.h"
#endif

#include "dynamic_clock.h"
#if (ANLG_FAM !=11)
#include "abb/abb.h"
#endif

#if (BOARD==35 || BOARD==46)
  #if (OP_L1_STANDALONE == 0)  
    #include "csmi/csmi.h"
    #include "csmi/csmi_gsmctrl.h"
    #include "csmi/csmi_uart.h"
    #include "uart/uartfax.h"
    #include "csmi/csmi_uartfax.h"
    #include "ffs/ffs.h"
    #include "ffs/ffspcm.h"
    #include "csmi/sleep.h"
  #endif   /* (OP_L1_STANDALONE == 0) */
#endif

/* WCP Profiler */
#if (BOARD==35 || BOARD==43 || BOARD==46) && (OP_L1_STANDALONE == 0)
  #if WCP_PROF == 1
    #include "prf/prf_api.h"
  #endif
#endif

#include "inth/iq.h"
#include "tpudrv.h"
#include "memif/mem.h"
#include "clkm/clkm.h"
#include "inth/inth.h"

#if (OP_L1_STANDALONE == 0)
  void  bspUicc_Phy_intCHandler(void);
#endif  

 #if (OP_L1_STANDALONE == 1)
  	#include "uart/serialswitch_core.h"
 #else
  #include "uart/serialswitch.h"
 #endif
 #include "uart/traceswitch.h"


#include "dma/dma.h"
#include "rhea/rhea_arm.h"

#include "ulpd/ulpd.h"

#if (PSP_STANDALONE == 0)
 #if (GSM_IDLE_RAM != 0)
  #if (OP_L1_STANDALONE == 1)
   #include "csmi_simul.h"
  #else
   #include "csmi/csmi.h"
  #endif
 #endif
#endif

#if (CHIPSET == 12) || (CHIPSET == 15) || ((CHIPSET == 10)  && (OP_WCP == 1))
  #include "memif/sys_memif.h"
#endif

#if ((CHIPSET == 12) || (CHIPSET == 15))
  #include "timer/timer_sec.h"
  #include "dma/sys_dma.h"
  #include "conf/sys_conf.h"
  #include "inth/sys_inth.h"
 #ifdef RVM_NAN_SWE
    #include "nan/nan_i.h"
 #endif
 #ifdef RVM_DMA_SWE
    #include "dma/board/dma_inth.h"
 #endif
 #ifdef RVM_I2C_SWE
    #include "i2c/i2c_hw_functions.h"
 #endif
 #ifdef RVM_MC_SWE
    #include "mc/board/mc_inth.h"
 #endif
 #ifdef RVM_USB_SWE
  #include "usb/usb_inth.h"
 #endif
#endif
//---------------------------------------------------------------------------------//
#include "rvf/rvf_api.h"
#include "sys_inth.h"
#define BIOS_TRACE_DEBUG(string)\
	rvf_send_trace (string,(sizeof(string)-1),4294967295,3,0x10001 )
#define BIOS_TRACE_DEBUG_PARAM(string,param)\
	rvf_send_trace (string,(sizeof(string)-1),param,3,0x10001 )
//---------------------------------------------------------------------------------//
void f_inth_uart_wakeup(void);

#if (OP_L1_STANDALONE == 0)
  #define TIMER_RESET_VALUE (0xFFFF)

  /*
   * These constants define the number of ticks per TDMA when timer 0
   * is set to pre-scale=0 and the upper limit in percent of TICKS_PER_TDMA 
   * for the execution of synchronous layer 1.
   */
  #define TICKS_PER_TDMA    (1875)
  #define LIMIT_FOR_L1_SYNC (80)
#endif

UWORD16 flash_device_id;
UWORD16 detect_flash_deviceID[3];
UWORD16 mcp_flash_BCR_reg[4];
#if (PSP_STANDALONE == 0)
 #if (OP_L1_STANDALONE == 0) 
  extern void ffs_main_init(void);
  extern void create_tasks(void);
  #if TI_NUC_MONITOR == 1
    extern void ti_nuc_monitor_tdma_action( void );
  #endif

  #if WCP_PROF == 1
    #if PRF_CALIBRATION == 1
      extern NU_HISR prf_CalibrationHISR;
    #endif
  #endif

 #else
  void l1ctl_pgm_clk32(UWORD32 nb_hf, UWORD32 nb_32khz);
  extern void L1_trace_string(char *s);
 #endif   /* (OP_L1_STANDALONE) */
#endif

#if (CHIPSET == 12) || (CHIPSET == 15)
extern const T_INTH_CONFIG a_inth_config[C_INTH_NB_INTERRUPT];
#ifdef RVM_CAMD_SWE
extern void f_camera_interrupt_manager(void);
#endif
#endif

#if (GSM_IDLE_RAM != 0)
  #if (CHIPSET == 12) || (CHIPSET == 15)

    // Interrupt handler called in case the interrupt requires the traffic controler active
    // These routines need to be declared here in order to put them into the a_inth_config_idle_ram structure
    extern void ext_ram_irq_inth_handler(void);
    extern void ext_ram_fiq_inth_handler(void);

		

    // declared for the _intram file generated by ICL470    
    extern const T_INTH_CONFIG a_inth_config_idle_ram[C_INTH_NB_INTERRUPT];

    // Debug mode: irq ext shall be connected to the chipselect signals
    #if GSM_IDLE_RAM_DEBUG
      extern void flash_access_handler(void);
      extern void ext_ram_access_handler(void);
    #endif
  #endif // CHIPSET 12 || CHIPSET 15
#endif  

#if (PSP_STANDALONE == 0)
 extern void   hisr(void);
 extern void   layer_1_sync_HISR_entry(void);

 extern NU_HISR  layer_1_sync_HISR;

 #if (CODE_VERSION != SIMULATION)
  #if (BOARD == 71)
   extern void INT_DisableIRQ(void);
   extern void INT_EnableIRQ(void);
  #endif /* (BOARD == 71) */
 #endif /* CODE_VERSION != SIMULATION */

#if (LOCOSTO_LITE==1)
#ifndef HISR_STACK_SHARING
#define HISR_STACK_SHARING
#endif
#endif

#ifdef HISR_STACK_SHARING
unsigned char HISR_STACK_PRIO2[1500]={0xFE};
#endif

#if (OP_L1_STANDALONE == 0)
  #pragma DATA_SECTION(layer_1_sync_stack,".stackandheap");
  #define LAYER_1_SYNC_STACK_SIZE (3000 /*4000*/)
  extern unsigned char layer_1_sync_stack[LAYER_1_SYNC_STACK_SIZE];
 #else
  #if (LONG_JUMP == 3)
    #pragma DATA_SECTION(layer_1_sync_stack,".HISR_stack");
  #endif

  #if TESTMODE
    extern char FAR layer_1_sync_stack[2600 /*3600*/];   // Frame interrupt task stack for EVA3
  #else
    extern char FAR layer_1_sync_stack[1600 /*2600*/];   // Frame interrupt task stack for EVA3
  #endif
 #endif   /* OP_L1_STANDALONE */

#if (FF_L1_IT_DSP_USF == 1) || (FF_L1_IT_DSP_DTX == 1)  
	extern void api_modem_hisr();  
#if (LONG_JUMP == 3)    
	#pragma DATA_SECTION(API_MODEM_HISR_stack,".l1s_global");  
#endif  
	extern char FAR API_MODEM_HISR_stack[0x400]; // stack size to be tuned  
	extern NU_HISR  api_modemHISR;
#endif

 #pragma DUPLICATE_FOR_INTERNAL_RAM_END

 #if !((MOVE_IN_INTERNAL_RAM == 1) && (GSM_IDLE_RAM !=0))
  #pragma GSM_IDLE_DUPLICATE_FOR_INTERNAL_RAM_START
  #if (OP_L1_STANDALONE == 0)
    /*
     * Timing monitor
     *
     *

⌨️ 快捷键说明

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