Beispiel #1
0
/* for documentation check os_test.h */
void test_result(int result)
{
   result_store = result;

   if (0 == result)
      test_debug("Test PASSED");
   else
      test_debug("Test FAILURE");

#ifndef TEST_BLINK
   arch_halt();
#else
   /* instead of arch_halt() blik the led */
   while (1) {
      uint16_t i = 0;

      PORTB |= _BV(PORTB5);
      _delay_ms(1000);
      PORTB &= ~_BV(PORTB5);
      _delay_ms(1000);

      test_debug("Result loop %"PRIu16, i++);
   }
#endif
}
Beispiel #2
0
void test_result(int result)
{
   result_store = result;
   unsigned i = 0;

   if(0 == result) {
      test_debug("Test PASSED");
   } else {
      test_debug("Test FAILURE");
   }

#ifndef TEST_BLINK
   arch_halt();
#else
   /* instead of arch_halt() blik the led */
   while (1) {

    PORTB |= _BV(PORTB5);
    _delay_ms(1000);
    PORTB &= ~_BV(PORTB5);
    _delay_ms(1000);

    test_debug("Result loop %u", i++);
   }
#endif
}
Beispiel #3
0
/* for documentation check os_test.h */
void test_result(int result)
{
   arch_criticalstate_t cristate;

   if(0 == result) {
      test_debug_printf("%s: Test PASSED\n", test_name);
   } else {
      test_debug_printf("%s: Test FAILURE\n", test_name);
   }

   arch_critical_enter(cristate);
   arch_halt();
}
Beispiel #4
0
void dsp_c_entry(void )
{
#if 0
    while(stop);
#ifndef __ARC600__
	if(DSP_RD(DSP_STATUS)==DSP_STATUS_RUNING)
	{/*halt the dsp */
		printk("audio dsp halted now\n");
		dsp_flush_printk_data();
		DSP_WD(DSP_STATUS,DSP_STATUS_HALT);
		arch_halt();
	}
	else
#endif
	{
		DSP_WD(DSP_STATUS,DSP_STATUS_RUNING);
	}
	printk("DSP version=%s,dsp clock %d\n",firmware_version,get_system_clk());
	
	
#if defined(ENABLE_EFUSE) || defined(ENABLE_FIRMWARE_ENCRYPT) 
	/*add by jeff begin*/
	add_data();
#endif

	DSP_WD(DSP_JIFFIES,0);
	dsp_memory_init();
#endif 
	dsp_irq_init();
#if 0
    dsp_timer_init();

	dsp_cache_init(1);
	dsp_mailbox_init();
#endif
	dsp_irq_enable();
#if 0
	init_device();
#endif
	start_system();
				
    while(1)
    {	
        //arch_sleep();
	//test_arc_run++;
	dsp_main();
    }
}
Beispiel #5
0
/**
* Halt the system
*/
void halt(void)
{
	arch_halt();
}