Beispiel #1
0
Datei: main.c Projekt: ADTL/AFGUI
//************************************************************
// MAIN
//************************************************************
//----------------------------------------------------------------------------
int main(void)

 {
	tn_arm_disable_interrupts();

	HardwareInit();
	
			
	tn_start_system(); //-- Never returns

   return 1;
}
//----------------------------------------------------------------------------
int main(void)
{
  int i;

   tn_arm_disable_interrupts();

   MEMMAP = 0x1;  //-- Flash Build

   HardwareInit();

   //===Takuji Ebinuma code===
   // make reset:
   outpw(RESET, 0);
   //set TIC period:
   outpw(PROG_TIC_LOW,   (7999999L & 0x0000ffff));      // 0.1 sec.
   outpw(PROG_TIC_HIGH, ((7999999L & 0xffff0000)>>16)); // 0.1 sec.

   // Initialize channels
   for (i=0; i<MAX_CHANNELS; i++) {
     CH[i].BASE = 0x26*i;
     CH[i].prn = IDLE;
     CH[i].lock_status = NO_LOCK;
     CH[i].pow_code = LossThresh;
     CH[i].pow_carr = LossThresh;
     CH[i].IP  = 0;
     CH[i].QP  = 0;
     CH[i].E   = 0;
     CH[i].Tau = 0;
     CH[i].half_chip_counter = 0;
     CH[i].freq_bin_counter  = 0;
     CH[i].pull_in_time      = 0;
     CH[i].carr_nco_sign = CARR_REF_SIGN; //[Art]. IQ-processing rough addition.
     CH[i].carr_nco      = CARR_REF;
     CH[i].code_nco      = CODE_REF;
   }
   //===Takuji Ebinuma code - END===

   tn_start_system(); //-- Never returns

   return 1;
}