Ejemplo n.º 1
0
int main() {

    SystemInit();
    SER_Init() ;
#if !defined(NO_FILESYSTEM)
    init_card () ;                                    /* initializing SD card */
#endif

    init_time() ;


#if defined(DEBUG_CYASSL)
    printf("Turning ON Debug message\n") ;
    CyaSSL_Debugging_ON() ;
#endif

#ifdef   HAVE_KEIL_RTX
    os_sys_init (main_task) ;
#else
    main_task() ;
#endif

    return 0 ; /* There should be no return here */

}
Ejemplo n.º 2
0
int main(void)
{
	go = 0;
	index_tab=0;


 	stm32_Init();

	Init_Periphs();
  
	Fixe_Rapport(0);

	os_sys_init (consigne); 
 	//consigne();

  	while(1)
  	{
		// pour tester le receiver de usart
  		/*unsigned char c;

    	printf ("tapez une lettre 1 pour afficher les mesures\r\n*");
    	c = getchar ();
    	printf ("\r\n*");
    	printf ("vous avez tapez '%c'.\r\n\r\n*", c);	
		   
  		*/
	}
}
Ejemplo n.º 3
0
int main()
{
  SystemInit();							//Init system
  uart0_init();							//Start UART
	os_sys_init(init);				//Start OS Processes
	return 0;
}
Ejemplo n.º 4
0
/* Main program : Initialize the system and start the first task */
int main (void)
{	
	Initialize_Button(USER);
	Initialize_Button(TAMPER);

	Initialize_Led(LED1);
	Initialize_Led(LED2);
	Initialize_Led(LED3);
	Initialize_Led(LED4);
	Initialize_Led(LED5);
	Initialize_Led(LED6);
	Initialize_Led(LED7);
	Initialize_Led(LED8);
	
	Turn_Led(LED1,ON);
	GPU_Init();
	JOY_Init();	
	initSD(&fs32);
	
	wait(1000000);

	while(1)
	{
		// Start the task menu allow to choose the program
		// - GIF unicorn
		// - Street of rage
		// - Zelda		
		os_sys_init (taskMenu);
	}	
} //Fin main
Ejemplo n.º 5
0
Archivo: main.c Proyecto: yamak/RTXTEST
int main(void)
{
	SystemCoreClockUpdate();
	GPIOInit();
	Usart2Init();
	Usart3Init();
	NVIC_EnableIRQ(USART3_IRQn);
	os_sys_init(init);
}
Ejemplo n.º 6
0
/**
 * [main Program entry]
 * @return [description]
 */
int main(void)
{
	
	SystemCoreClockUpdate();
	/* Thin line enables clock to peripherals */
	LPC_SYSCTL->SYSAHBCLKCTRL |= (1<<16);
	
	/* Run Init Task */
	os_sys_init(InitTask);
}
Ejemplo n.º 7
0
/*----------------------------------------------------------------------------
 *        Main: Initialize and start RTX Kernel
 *---------------------------------------------------------------------------*/
int main (void) {

  SystemInit();                             /* Initialize the MCU clocks     */

  LED_init ();                              /* Initialize the LEDs           */
 
  GLCD_Init();                              /* Initialize the GLCD           */
  GLCD_Clear(White);                        /* Clear the GLCD                */

  os_sys_init(init);                        /* Initialize RTX and start init */
}
Ejemplo n.º 8
0
int main(void)
{
	SystemInit();         /* initialize the LPC17xx MCU */
  uart0_init();         /* initilize the first UART */
  
  
  /* fill the fname map with os_idle_demon entry point */
  g_task_map[0].p = os_idle_demon;
  
  printf("Calling os_sys_init()...\n");
	os_sys_init(init);	  /* initilize the OS and start the first task */
}
Ejemplo n.º 9
0
/*----------------------------------------------------------------------------
 *        Main: Initialize and start RTX Kernel
 *---------------------------------------------------------------------------*/
int main (void) {                     /* program execution starts here       */

 	SystemInit();         /* initialize the LPC17xx MCU */
  uart0_init();         /* initilize the first UART */
  
	

  printf("Calling os_sys_init()...\n");

	
	_init_box (mpool, sizeof(mpool),    /* initialize the 'mpool' memory for   */
              sizeof(T_NUM));        /* the membox dynamic allocation       */
	os_sys_init(init);	  /* initilize the OS and start the first task */
}
Ejemplo n.º 10
0
Archivo: main.c Proyecto: marcaz/Fleet
int main(void){
	//----------------------------------------------------------------
	// Low Level Peripheral INIT [must be done before RTOS Init]
	//----------------------------------------------------------------
	Init_USARTS();
	os_dly_wait(1);
	Acc_Init();
	os_dly_wait(1);
	//----------------------------------------------------------------
	//
	//----------------------------------------------------------------
	os_sys_init(Init_System);
	//----------------------------------------------------------------
}
Ejemplo n.º 11
0
int main( void ) {

	SystemInit();
	SystemCoreClockUpdate();

	printf(" ");

	// We will change the value of the seed for the test
	srand( 10 );

	os_sys_init( base_task );

	while ( 1 ) {
		// Endless loop
	}
}
Ejemplo n.º 12
0
int main(void) {
//
//--------------------------------------
//-- 串口初始化  
    serialDebug.begin(115200);
//
//--------------------------------------
//-- EEprom 调取参数
     if (EEP.data.ver==0 || EEp_init_flag==0)  
			 eep.wirte((uint8 *)&EEP_DF, (uint32)&EEP, sizeof(para));
     memCopy((char *)&para, (char *)&EEP, sizeof(para));
//
//--------------------------------------
//== 操作系统启动
    os_sys_init(init_task);
//
//--------------------------------------
}
Ejemplo n.º 13
0
Archivo: MAIN.C Proyecto: sgx2013/test
/***********************************************************************
*  Name        : main
*  Description : startup code
*  Parameter   : None
*  Returns     : int
***********************************************************************/
int main(void)
{  
   pw_check_mcu_reset_source();
   pw_eeprom_iic_reset_create();

    /*if the voltage lower than 6.5v,we go to stop mode directly*/
    if(!PW_CHECK_6V5_VOLTAGE()) //below than 6.5v, enter stop mode
    {
        pw_mcu_entry_stop_mode();
    }
    else	
    {
        os_sys_init(task_init_power);
    }
    for(;;)
    {
        mcu_sw_reset();
    }  
}
/*----------------------------------------------------------------------------
  MAIN function
 *----------------------------------------------------------------------------*/
int main (void) {

	Init_Debug_Signals();
	Init_RGB_LEDs();
	Sound_Init();	
	// Sound_Disable_Amp();
	Play_Tone();
	
	TFT_Init();
	TFT_Text_Init(1);
	TFT_Erase();
	TFT_Text_PrintStr_RC(0,0, "Test Code");

/*
	Graphics_Test();
	while (1) 
		;
*/
	
//	TFT_TS_Calibrate();
//	TFT_TS_Test();

	TFT_Text_PrintStr_RC(1,0, "Accel...");

	i2c_init();											// init I2C peripheral
	if (!init_mma()) {							// init accelerometer
		Control_RGB_LEDs(1,0,0);			// accel initialization failed, so turn on red error light
		while (1)
			;
	}
	TFT_Text_PrintStr_RC(1,9, "Done");

	Play_Waveform_with_DMA();

	Delay(70);

	os_sys_init(&Task_Init);

	while (1)
		;
}
Ejemplo n.º 15
0
/*----------------------------------------------------------------------------
 *  Main: Initialize and start RTX Kernel
 *---------------------------------------------------------------------------*/
int main (void) 
{
	int i1=0;
	int j1=0;
	
	uint8_t write_buf[128]={0};
	uint8_t read_buf[128]={0};
	uint8_t i=0;
	uint32_t err_count=0;
	uint32_t ok_count=0;
	int tmp=0;	

	SystemClockInit();						// 内部8M时钟初始化 主频36M

	BspInit();									// 板级初始化

	User_NVIC_Configuration();	// 中断向量表初始化, bootloader与APP的中断向量 配置
	RTC_RX8025_Init();

	os_sys_init(task_init);                    /* Initialize RTX and start init    */
}
Ejemplo n.º 16
0
int main (void) {
  /* Start with 'init' task. */
  os_sys_init(init);
  while(1);
}
Ejemplo n.º 17
0
/*----------------------------------------------------------------------------
 *        Main: Initialize and start RTX Kernel
 *---------------------------------------------------------------------------*/
int main (void) {
  os_sys_init (task1);
}
Ejemplo n.º 18
0
/**
  * @brief  Main program.
  * @param  None
  * @retval None
  */ 
int main(void)
{  
  /* STM32F4xx HAL library initialization:
       - Configure the Flash prefetch, instruction and Data caches
       - Configure the Systick to generate an interrupt each 1 msec
       - Set NVIC Group Priority to 4
       - Global MSP (MCU Support Package) initialization
     */
  HAL_Init();  
  
  /* Configure the system clock to have a system clock = 180 Mhz */
  SystemClock_Config();
  
  /* Init the STemWin GUI Library */
 BSP_SDRAM_Init(); /* Initializes the SDRAM device */
 __CRC_CLK_ENABLE(); /* Enable the CRC Module */
	
	
//	__PWR_CLK_ENABLE();
//	HAL_PWR_EnableBkUpAccess();

//	__HAL_RCC_LSE_CONFIG(RCC_LSE_BYPASS);
//	__HAL_RCC_RTC_ENABLE();
	
	/*##-1- Configure the RTC peripheral #######################################*/
  RtcHandle.Instance = RTC;
  
  /* Configure RTC prescaler and RTC data registers */
  /* RTC configured as follow:
      - Hour Format    = Format 24
      - Asynch Prediv  = Value according to source clock
      - Synch Prediv   = Value according to source clock
      - OutPut         = Output Disable
      - OutPutPolarity = High Polarity
      - OutPutType     = Open Drain */ 
  RtcHandle.Init.HourFormat = RTC_HOURFORMAT_24;
  RtcHandle.Init.AsynchPrediv = RTC_ASYNCH_PREDIV;
  RtcHandle.Init.SynchPrediv = RTC_SYNCH_PREDIV;
  RtcHandle.Init.OutPut = RTC_OUTPUT_DISABLE;
  RtcHandle.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH;
  RtcHandle.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN;
  
  if(HAL_RTC_Init(&RtcHandle) != HAL_OK)
  {
    /* Initialization Error */
    Error_Handler(); 
  }
   
  /*##-2- Check if Data stored in BackUp register0: No Need to reconfigure RTC#*/
  /* Read the BackUp Register 0 Data */
  if(HAL_RTCEx_BKUPRead(&RtcHandle, RTC_BKP_DR0) != 0x32F2)
  {  
    /* Configure RTC Calendar */
    RTC_CalendarConfig();
  }
  else
  {
    /* Check if the Power On Reset flag is set */  
    if(__HAL_RCC_GET_FLAG(RCC_FLAG_PORRST) != RESET)
    {
     
    }
    /* Check if Pin Reset flag is set */
    if(__HAL_RCC_GET_FLAG(RCC_FLAG_PINRST) != RESET)
    {
     
    }
    
    /* Clear Reset Flag */
    __HAL_RCC_CLEAR_RESET_FLAGS();
  }
	
  
	
  GUI_Init();  
  //GUI_Initialized = 1;
  GPIO_Config();
	if(HAL_RTCEx_BKUPRead(&RtcHandle, RTC_BKP_DR1) ==0)
	{
		 HAL_RTCEx_BKUPWrite(&RtcHandle,RTC_BKP_DR1,600);  
	}
	Time3Enable(HAL_RTCEx_BKUPRead(&RtcHandle, RTC_BKP_DR1));

  /* Activate the use of memory device feature */
  WM_SetCreateFlags(WM_CF_MEMDEV);
    
 os_sys_init (init); 
  
}