Esempio n. 1
0
void APP_Run(void) {
  SHELL_Init();
#if PL_CONFIG_BLEUART_CMDMODE_ENABLED
  BLEUART_CMDMODE_Init();
#endif
  vTaskStartScheduler(); /* run the RTOS */
}
Esempio n. 2
0
void APP_Run(void) {
  appState = APP_STATE_INIT;
  MOT_Init();
  SHELL_Init();
#if PL_HAS_LINE_SENSOR
  REF_Init();
  LF_Init();
  TURN_Init();
#endif
#if PL_HAS_ULTRASONIC
  US_Init();
#endif
#if PL_HAS_BUZZER
  BUZ_Init();
#endif
#if PL_HAS_EVENTS
  EVNT_Init();
#endif
#if PL_HAS_RADIO
  RADIO_Init();
#endif
#if PL_HAS_REMOTE
  REMOTE_Init();
#endif
#if PL_HAS_QUEUE
  QUEUE_Init();
#endif
  if (FRTOS1_xTaskCreate(MainTask, (signed portCHAR *)"Main", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY+1, NULL) != pdPASS) {
    for(;;){} /* error */
  }
  FRTOS1_vTaskStartScheduler();
}
Esempio n. 3
0
void APP_Start(void) {
  SHELL_Init();
  if (FRTOS1_xTaskCreate(
      MainTask,  /* pointer to the task */
      (signed portCHAR *)"Main", /* task name for kernel awareness debugging */
      configMINIMAL_STACK_SIZE, /* task stack size */
      (void*)NULL, /* optional task startup argument */
      tskIDLE_PRIORITY+2,  /* initial priority */
      (xTaskHandle*)NULL /* optional task handle to create */
    )!=pdPASS)
  {
    for(;;) {} /* not enough heap memory? */
  }
#if HAS_SOUND
  if (FRTOS1_xTaskCreate(
        SoundTask,  /* pointer to the task */
        (signed portCHAR *)"Sound", /* task name for kernel awareness debugging */
        configMINIMAL_STACK_SIZE, /* task stack size, need extra size for SD card routines */
        (void*)NULL, /* optional task startup argument */
        tskIDLE_PRIORITY+1,  /* initial priority */
        &soundTaskHandle /* optional task handle to create */
      ) != pdPASS) {
     for(;;){}; /* error! probably out of memory */
  }
#endif
  FRTOS1_vTaskStartScheduler();
}
Esempio n. 4
0
void APP_Run(void) {
  LED1_On();
  LED1_Off();
  LED2_On();
  LED2_Off();
  LED3_On();
  LED3_Off();
#if PL_HAS_SHELL
  SHELL_Init();
#endif
#if PL_HAS_ESC
  ESC_Init();
#endif
  if (FRTOS1_xTaskCreate(
      AppTask,  /* pointer to the task */
      "Main", /* task name for kernel awareness debugging */
      configMINIMAL_STACK_SIZE, /* task stack size */
      (void*)NULL, /* optional task startup argument */
      tskIDLE_PRIORITY,  /* initial priority */
      (xTaskHandle*)NULL /* optional task handle to create */
    ) != pdPASS)
  {
    for(;;){} /* error! probably out of memory */
  }
  FRTOS1_vTaskStartScheduler();
  for(;;) {}
}
Esempio n. 5
0
void APP_Run(void) {
  SHELL_Init();
  US_Init();
  INF_Init();

  FRTOS1_vTaskStartScheduler();
}
Esempio n. 6
0
void APP_Start(void) {
#if PL_HAS_RTOS_TRACE
  if(RTOSTRC1_uiTraceStart()!=1) {
    for(;;){} /* failure? */
  }
#endif
#if PL_HAS_RADIO
  RNETA_Init();
#endif
  SHELL_Init();
  if (FRTOS1_xTaskCreate(
      MainTask,  /* pointer to the task */
      "Main", /* task name for kernel awareness debugging */
      configMINIMAL_STACK_SIZE, /* task stack size */
      (void*)NULL, /* optional task startup argument */
      tskIDLE_PRIORITY,  /* initial priority */
      (xTaskHandle*)NULL /* optional task handle to create */
    ) != pdPASS) {
  /*lint -e527 */
  for(;;){} /* error! probably out of memory */
    /*lint +e527 */
  }
  timerHndl = xTimerCreate("timer0", TIMER_PERIOD_MS/portTICK_RATE_MS, pdTRUE, (void *)0, vTimerCallback);
  if (timerHndl==NULL) {
    for(;;); /* failure! */
  }
  if (xTimerStart(timerHndl, 0)!=pdPASS) {
    for(;;); /* failure! */
  }
  FRTOS1_vTaskStartScheduler();
}
Esempio n. 7
0
void APP_Run(void) {
  NEO_Init();
  SHELL_Init();
#if PL_HAS_MUSIC || PL_HAS_SD_CARD
  SPIBus_Init();
#endif
#if PL_HAS_MUSIC
  MUSIC_Init();
#endif
#if PL_HAS_RNET
  RNETA_Init();
#endif
#if PL_HAS_PONG
  PONG_Init();
#else
  if (FRTOS1_xTaskCreate(
        NeoTask,  /* pointer to the task */
        "Neo", /* task name for kernel awareness debugging */
        configMINIMAL_STACK_SIZE, /* task stack size */
        (void*)NULL, /* optional task startup argument */
        tskIDLE_PRIORITY,  /* initial priority */
        (xTaskHandle*)NULL /* optional task handle to create */
      ) != pdPASS) {
    /*lint -e527 */
    for(;;){}; /* error! probably out of memory */
    /*lint +e527 */
  }
#endif
  FRTOS1_vTaskStartScheduler();
}
Esempio n. 8
0
void APP_Run(void) {
//  DiskTest();
  SHELL_Init();
#if PL_CONFIG_HAS_LOGGER
 LOGGER_Init();
#endif
  vTaskStartScheduler();
}
Esempio n. 9
0
void BL_Run(void) {
  SHELL_Init();
  for(;;) {
    SHELL_Parse();
    LEDR_Neg();
    WAIT1_Waitms(100);
  }
}
Esempio n. 10
0
void APP_Start(void) {
  NEO_Init();
  SHELL_Init();
  if (FRTOS1_xTaskCreate(AppTask, "App", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY+2, NULL) != pdPASS) {
    for(;;){} /* error */
  }
  FRTOS1_vTaskStartScheduler();
}
Esempio n. 11
0
static portTASK_FUNCTION(MainTask, pvParameters) {
  (void)pvParameters; /* parameter not used */
  TRACE_Init();
  MMA1_Init(); /* enable accelerometer, if not already enabled */
  SHELL_Init();
  for(;;) {
    LED1_Neg();
    FRTOS1_vTaskDelay(1000/portTICK_RATE_MS);
  }
}
Esempio n. 12
0
void APP_Run(void) {
  SHELL_Init(); /* initialize shell */
  VS_Init(); /* initialize VS1053B module */
#if RADIO
  RNETA_Init();
#endif
#if PLAYER
  PLR_Init();
#endif
  FRTOS1_vTaskStartScheduler();
}
Esempio n. 13
0
void APP_Start(void) {
  enabledWalking = FALSE;
  SHELL_Init();
#if SHELL
  if (FRTOS1_xTaskCreate(
        ShellTask,  /* pointer to the task */
        (signed char *)"Shell", /* task name for kernel awareness debugging */
        configMINIMAL_STACK_SIZE+200, /* task stack size */
        (void*)NULL, /* optional task startup argument */
        tskIDLE_PRIORITY+1,  /* initial priority */
        (xTaskHandle*)NULL /* optional task handle to create */
      ) != pdPASS) {
     for(;;){}; /* error! probably out of memory */
  }
#endif
#if WALKING
  if (FRTOS1_xTaskCreate(
          WalkingTask,  /* pointer to the task */
          (signed char *)"Walk", /* task name for kernel awareness debugging */
          configMINIMAL_STACK_SIZE+200, /* task stack size */
          (void*)NULL, /* optional task startup argument */
          tskIDLE_PRIORITY+3,  /* initial priority */
          NULL /* optional task handle to create */
        ) != pdPASS) {
       for(;;){}; /* error! probably out of memory */
    }
#endif
#if ACCEL
  if (FRTOS1_xTaskCreate(
            AccelToLEDTask,  /* pointer to the task */
            (signed char *)"Accel", /* task name for kernel awareness debugging */
            configMINIMAL_STACK_SIZE+200, /* task stack size */
            (void*)NULL, /* optional task startup argument */
            tskIDLE_PRIORITY+2,  /* initial priority */
            (xTaskHandle*)NULL /* optional task handle to create */
          ) != pdPASS) {
         for(;;){}; /* error! probably out of memory */
      }
#endif
#if TOUCH
  if (FRTOS1_xTaskCreate(
            TouchTask,  /* pointer to the task */
            (signed char *)"Touch", /* task name for kernel awareness debugging */
            configMINIMAL_STACK_SIZE+100, /* task stack size */
            (void*)NULL, /* optional task startup argument */
            tskIDLE_PRIORITY+4,  /* initial priority */
            (xTaskHandle*)NULL  /*optional task handle to create */
          ) != pdPASS) {
         for(;;){}; /* error! probably out of memory */
      }
#endif
  FRTOS1_vTaskStartScheduler();
}
Esempio n. 14
0
void APP_Run(void) {
  SHELL_Init();
  APP_TestServos();
  REL_Init();
  APP_TestRelais();
  for(;;) {
    SHELL_Parse();
#if 0
    if (duty!=oldDuty) {
      MOTL_SetRatio16(duty);
      oldDuty = duty;
    }
#endif
  }
}
Esempio n. 15
0
void APP_Run(void) {
  SHELL_Init();
  if (FRTOS1_xTaskCreate(
        Task1,  /* pointer to the task */
        (signed portCHAR *)"Task1", /* task name for kernel awareness debugging */
        configMINIMAL_STACK_SIZE, /* task stack size */
        (void*)NULL, /* optional task startup argument */
        tskIDLE_PRIORITY,  /* initial priority */
        (xTaskHandle*)NULL /* optional task handle to create */
      ) != pdPASS) {
    /*lint -e527 */
    for(;;){}; /* error! probably out of memory */
    /*lint +e527 */
  }
  FRTOS1_vTaskStartScheduler();
}
Esempio n. 16
0
void APP_Run(void) {
#if configUSE_TRACE_HOOKS
  if (RTOSTRC1_uiTraceStart()==0) {
    for(;;){} /* error starting trace recorder. Not setup for enough queues/tasks/etc? */
  }
#endif

#if PL_HAS_SD_CARD
  /* SD card detection: PTB16 with pull-down! */
  PORT_PDD_SetPinPullSelect(PORTB_BASE_PTR, 16, PORT_PDD_PULL_DOWN);
  PORT_PDD_SetPinPullEnable(PORTB_BASE_PTR, 16, PORT_PDD_PULL_ENABLE);
#endif
#if PL_HAS_PUSH_BUTTONS
  /* SW2: PTC1 */
  PORT_PDD_SetPinPullSelect(PORTC_BASE_PTR, 1, PORT_PDD_PULL_UP);
  PORT_PDD_SetPinPullEnable(PORTC_BASE_PTR, 1, PORT_PDD_PULL_ENABLE);
  /* SW3: PTB17 */
  PORT_PDD_SetPinPullSelect(PORTB_BASE_PTR, 17, PORT_PDD_PULL_UP);
  PORT_PDD_SetPinPullEnable(PORTB_BASE_PTR, 17, PORT_PDD_PULL_ENABLE);
#endif

  LED1_On();
  LED1_Off();
  LED2_On();
  LED2_Off();
  LED3_On();
  LED3_Off();
#if PL_HAS_SHELL
  SHELL_Init();
#endif
#if PL_HAS_ESC
  ESC_Init();
#endif
  if (FRTOS1_xTaskCreate(
      AppTask,  /* pointer to the task */
      "Main", /* task name for kernel awareness debugging */
      configMINIMAL_STACK_SIZE, /* task stack size */
      (void*)NULL, /* optional task startup argument */
      tskIDLE_PRIORITY,  /* initial priority */
      (xTaskHandle*)NULL /* optional task handle to create */
    ) != pdPASS)
  {
    for(;;){} /* error! probably out of memory */
  }
  FRTOS1_vTaskStartScheduler();
  for(;;) {}
}
Esempio n. 17
0
/*lint -save  -e970 Disable MISRA rule (6.3) checking. */
int main(void)
/*lint -restore Enable MISRA rule (6.3) checking. */
{
  /* Write your local variable definition here */

  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
  PE_low_level_init();
  /*** End of Processor Expert internal initialization.                    ***/
  LED2_On();
  WAIT1_Waitms(1000);
  LED2_Off();
  
#if PL_HAS_LOW_POWER
  LP_Init();
#endif
#if PL_HAS_RTOS
  if (FRTOS1_xTaskCreate(BlinkTask, "Blink", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL) != pdPASS) {
    for(;;){} /* error */
  }
#endif
#if PL_HAS_SHELL
  SHELL_Init();
#endif
#if PL_HAS_RTOS
  PEX_RTOS_START();
#endif
  for(;;) {
    LP_EnterPowerMode(LP_WAIT);
    LED1_On();
    WAIT1_Waitms(20);
    LED1_Off();
  }

  /* For example: for(;;) { } */

  /*** Don't write any code pass this line, or it will be deleted during code generation. ***/
  /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/
  #ifdef PEX_RTOS_START
    PEX_RTOS_START();                  /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
  #endif
  /*** End of RTOS startup code.  ***/
  /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
  for(;;){}
  /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
Esempio n. 18
0
void APP_Run(void) {
  appState = APP_STATE_INIT;
  REF_Init();
  MOT_Init();
  SHELL_Init();
  LF_Init();
  TURN_Init();
#if 0
  US_Init();
#endif
#if PL_HAS_BUZZER
  BUZ_Init();
#endif
  if (FRTOS1_xTaskCreate(MainTask, (signed portCHAR *)"Main", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY+1, NULL) != pdPASS) {
    for(;;){} /* error */
  }
  FRTOS1_vTaskStartScheduler();
}
Esempio n. 19
0
void APP_Run(void) {
  CLS1_ConstStdIOType *io;

  WAIT1_Waitms(1000); /* wait after power-on */
  ESP_Init();
  SHELL_Init();

  io = CLS1_GetStdio();
  CLS1_SendStr("\r\n------------------------------------------\r\n", io->stdOut);
  CLS1_SendStr("ESP8266 with FRDM-KL25Z\r\n", io->stdOut);
  CLS1_SendStr("------------------------------------------\r\n", io->stdOut);
  CLS1_PrintPrompt(io);
  for(;;) {
    ESP_Process();
    SHELL_Parse();
    WAIT1_Waitms(10);
  }
}
Esempio n. 20
0
void APP_Run(void) {
#if PL_HAS_SHELL
  SHELL_Init();
#endif
#if PL_HAS_RADIO
  RNETA_Init();
#endif
  if (FRTOS1_xTaskCreate(
        AppTask,  /* pointer to the task */
        "App", /* task name for kernel awareness debugging */
        configMINIMAL_STACK_SIZE, /* task stack size */
        (void*)NULL, /* optional task startup argument */
        tskIDLE_PRIORITY+2,  /* initial priority */
        (xTaskHandle*)NULL /* optional task handle to create */
      ) != pdPASS) {
    /*lint -e527 */
    for(;;){}; /* error! probably out of memory */
    /*lint +e527 */
  }
  FRTOS1_vTaskStartScheduler();
}
Esempio n. 21
0
/*lint -save  -e970 Disable MISRA rule (6.3) checking. */
int main(void)
/*lint -restore Enable MISRA rule (6.3) checking. */
{
  /* Write your local variable definition here */

  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
  PE_low_level_init();
  /*** End of Processor Expert internal initialization.                    ***/

  SHELL_Init();

  /*** Don't write any code pass this line, or it will be deleted during code generation. ***/
  /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/
  #ifdef PEX_RTOS_START
    PEX_RTOS_START();                  /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
  #endif
  /*** End of RTOS startup code.  ***/
  /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
  for(;;){}
  /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
Esempio n. 22
0
void PL_INIT(void)
{
	#if PL_HAS_LED
		LED_INIT();
	#endif

	#if PL_HAS_RTOS
		RTOS_Init();
	#endif

	#if PL_HAS_EVENTS
		EVENT_Init();
	#endif

	#if PL_HAS_KEYS
		KEY_Init();
	#endif

	#if PL_HAS_TRIGGER
		TRG_Init();
	#endif

	#if PL_HAS_DEBOUNCE
		DBNC_Init();
	#endif

	#if PL_HAS_MEALY
		MEALY_Init();
	#endif

	#if PL_HAS_BUZZER
			BUZ_Init();
	#endif

	#if PL_HAS_SHELL
		SHELL_Init();
	#endif
}
Esempio n. 23
0
static portTASK_FUNCTION(MainTask, pvParameters) {
  unsigned char lcdBuf[sizeof("1234")];
  uint16_t cntr;
  
  (void)pvParameters; /* parameter not used */
  TRACE_Init();
  MMA1_Init(); /* enable accelerometer, if not already enabled */
  MAG1_Enable(); /* enable magnetometer */
  SHELL_Init();
  cntr = 0;
  for(;;) {
    UTIL1_Num16uToStrFormatted(lcdBuf, sizeof(lcdBuf), cntr, '0', 4);
    vfnLCD_Write_Msg(lcdBuf);
    cntr++;
    if (cntr>9999) { /* can only display 4 digits */
      cntr = 0;
    }
#if APP_USE_KEY_COMPONENT
    KEY1_ScanKeys(); /* using component in polling mode: poll keys, this will create events as needed. */
    EVNT1_HandleEvent();
#else
    if (SW1_GetVal()==0) { /* button pressed */
      FRTOS1_vTaskDelay(50/portTICK_RATE_MS); /* wait to debounce */
      while (SW1_GetVal()==0) { /* still pressed? */
        LED1_On();
      }
    }
    if (SW3_GetVal()==0) { /* button pressed */
      FRTOS1_vTaskDelay(50/portTICK_RATE_MS); /* wait to debounce */
      while (SW3_GetVal()==0) { /* still pressed? */
        LED2_On();
      }
    }
#endif
    LED1_Neg();
    FRTOS1_vTaskDelay(50/portTICK_RATE_MS);
  }
}
Esempio n. 24
0
void vDos_Init(void)
	{
	hideWinTill = GetTickCount()+2500;												// Auto hidden till first keyboard check, parachute at 2.5 secs

	LOG_MSG("vDos version: %s", vDosVersion);

#ifndef WITHIRQ1
	// Wil have been called earlier in starup if WITHIRQ1 is defined
	vDos_LoadConfig();
#endif

	GUI_StartUp();
	IO_Init();
	PAGING_Init();
	MEM_Init();
	CALLBACK_Init();
	PIC_Init();
	PROGRAMS_Init();
	TIMER_Init();
//	CMOS_Init();
	VGA_Init();
	CPU_Init();
	KEYBOARD_Init();
	BIOS_Init();
	INT10_Init();
	MOUSE_Init();
	SERIAL_Init();
	PARALLEL_Init();
	printTimeout = ConfGetBool("timeout");
	DOS_Init();
	XMS_Init();
	EMS_Init();
	if (errorMess[0])
		MessageBox(NULL, errorMess+1, "vDos: CONFIG.TXT has unresolved items", MB_OK|MB_ICONWARNING);
	SHELL_Init();																	// Start up main machine
	}
Esempio n. 25
0
/**
 * Part of STARTUP I
 *
 * @param ConfigPtr
 */
void EcuM_AL_DriverInitOne(const EcuM_ConfigType *ConfigPtr)
{
	(void)ConfigPtr;

//	VALIDATE_STATE( ECUM_STATE_STARTUP_ONE );

  //lint --e{715}       PC-Lint (715) - ConfigPtr usage depends on configuration of modules

#if defined(USE_MCU)
	Mcu_Init(ConfigPtr->McuConfig);

	/* Set up default clock (Mcu_InitClock requires initRun==1) */
	/* Ignoring return value */
	(void) Mcu_InitClock(ConfigPtr->McuConfig->McuDefaultClockSettings);

	// Wait for PLL to sync.
	while (Mcu_GetPllStatus() != MCU_PLL_LOCKED) {
		;
	}

	Mcu_DistributePllClock();
#endif

#if defined(USE_DEM)
	// Preinitialize DEM
	NO_DRIVER(Dem_PreInit(ConfigPtr->DemConfig));
#endif

#if defined(USE_PORT)
	// Setup Port
	Port_Init(ConfigPtr->PortConfig);
#endif

#if defined(USE_GPT)
	// Setup the GPT
	Gpt_Init(ConfigPtr->GptConfig);
#endif

	// Setup watchdog
#if defined(USE_WDG)
	Wdg_Init(ConfigPtr->WdgConfig);
#endif
#if defined(USE_WDGM)
	NO_DRIVER(WdgM_Init(ConfigPtr->WdgMConfig));
#endif

#if defined(USE_DMA)
	// Setup DMA
	Dma_Init(ConfigPtr->DmaConfig);
#endif

#if defined(USE_ADC)
	// Setup ADC
	Adc_Init(ConfigPtr->AdcConfig);
#endif

	// Setup ICU
	// TODO
	// Setup PWM
#if defined(USE_PWM)
	// Setup PWM
	Pwm_Init(ConfigPtr->PwmConfig);
#endif

#if defined(CFG_SHELL)
	SHELL_Init();
#endif


}
/**
 * Part of STARTUP I
 *
 * @param ConfigPtr
 */
void EcuM_AL_DriverInitOne(const EcuM_ConfigType *ConfigPtr)
{
	(void)ConfigPtr;

#if defined(USE_MCU)
	Mcu_Init(ConfigPtr->McuConfig);

	/* Set up default clock (Mcu_InitClock requires initRun==1) */
	/* Ignoring return value */
	(void) Mcu_InitClock(ConfigPtr->McuConfig->McuDefaultClockSettings);

	// Wait for PLL to sync.
	while (Mcu_GetPllStatus() != MCU_PLL_LOCKED) {
		;
	}

	Mcu_DistributePllClock();
#endif

#if defined(USE_DEM)
	// Preinitialize DEM
	NO_DRIVER(Dem_PreInit(ConfigPtr->DemConfig));
#endif

#if defined(USE_PORT)
	// Setup Port
	Port_Init(ConfigPtr->PortConfig);
#endif

#if defined(USE_DIO)
    // Setup Dio
    Dio_Init(ConfigPtr->DioCfg);
#endif

#if defined(USE_GPT)
	// Setup the GPT
	Gpt_Init(ConfigPtr->GptConfig);
#endif

	// Setup watchdog
#if defined(USE_WDG)
	Wdg_Init(ConfigPtr->WdgConfig);
#endif
#if defined(USE_WDGM)
	NO_DRIVER(WdgM_Init(ConfigPtr->WdgMConfig));
#endif

#if defined(USE_DMA)
	// Setup DMA
	Dma_Init(ConfigPtr->DmaConfig);
#endif

#if defined(USE_ADC)
	// Setup ADC
	Adc_Init(ConfigPtr->AdcConfig);
#endif

#if defined(USE_BSWM)
	// Setup BSWM - not supporting configustructure for BswM
	BswM_Init(NULL);
#endif

	// Setup ICU
#if defined(USE_ICU)
     Icu_Init(ConfigPtr->IcuConfig);
#endif

	// Setup PWM
#if defined(USE_PWM)
	// Setup PWM
	Pwm_Init(ConfigPtr->PwmConfig);
#endif

    // Setup OCU
#if defined(USE_OCU)
	 Ocu_Init(ConfigPtr->OcuConfig);
#endif

#if defined(CFG_SHELL)
	SHELL_Init();
#endif
}
Esempio n. 27
0
void PL_Init(void) {
#if PL_CONFIG_HAS_LED
    LED_Init();
#endif
#if PL_CONFIG_HAS_EVENTS
    EVNT_Init();
#endif
#if PL_CONFIG_HAS_TIMER
    TMR_Init();
#endif
#if PL_CONFIG_HAS_TRIGGER
    TRG_Init();
#endif
#if PL_CONFIG_HAS_BUZZER
    BUZ_Init();
#endif
#if PL_CONFIG_HAS_RTOS
    RTOS_Init();
#endif
#if PL_CONFIG_HAS_SHELL
    SHELL_Init();
#endif
#if PL_CONFIG_HAS_SHELL_QUEUE
    SQUEUE_Init();
#endif
#if PL_CONFIG_HAS_MOTOR
    MOT_Init();
#endif
#if PL_CONFIG_HAS_LINE_SENSOR
    REF_Init();
#endif
#if PL_CONFIG_HAS_MOTOR_TACHO
    TACHO_Init();
#endif
#if PL_CONFIG_HAS_MCP4728
    MCP4728_Init();
#endif
#if PL_CONFIG_HAS_ULTRASONIC
    US_Init();
#endif
#if PL_CONFIG_HAS_PID
    PID_Init();
#endif
#if PL_CONFIG_HAS_DRIVE
    DRV_Init();
#endif
#if PL_CONFIG_HAS_TURN
    TURN_Init();
#endif
#if PL_CONFIG_HAS_LINE_FOLLOW
    LF_Init();
#endif
#if PL_CONFIG_HAS_RADIO
    RNETA_Init();
#endif
#if PL_CONFIG_HAS_REMOTE
    REMOTE_Init();
#endif
#if PL_CONFIG_HAS_IDENTIFY
    ID_Init();
#endif
#if PL_CONFIG_HAS_LINE_MAZE
    MAZE_Init();
#endif
}
Esempio n. 28
0
void APP_Run(void) {
  SHELL_Init();
  HOVAL_Init();
  FRTOS1_vTaskStartScheduler();
}
Esempio n. 29
0
void APP_Run(void) {
  uint16_t i;

  for(i=0;i<16;i++) {
    LED1_Neg();
    LED2_Neg();
    LED3_Neg();
    LED4_Neg();
    WAIT1_Waitms(50);
  }
  SHELL_Init();
  if (FRTOS1_xTaskCreate(
        Task1,  /* pointer to the task */
        "Task1", /* task name for kernel awareness debugging */
        configMINIMAL_STACK_SIZE, /* task stack size */
        (void*)NULL, /* optional task startup argument */
        tskIDLE_PRIORITY,  /* initial priority */
        (xTaskHandle*)NULL /* optional task handle to create */
      ) != pdPASS) {
    /*lint -e527 */
    for(;;){}; /* error! probably out of memory */
    /*lint +e527 */
  }
  if (FRTOS1_xTaskCreate(
        Task2,  /* pointer to the task */
        "Task2", /* task name for kernel awareness debugging */
        configMINIMAL_STACK_SIZE, /* task stack size */
        (void*)NULL, /* optional task startup argument */
        tskIDLE_PRIORITY,  /* initial priority */
        (xTaskHandle*)NULL /* optional task handle to create */
      ) != pdPASS) {
    /*lint -e527 */
    for(;;){}; /* error! probably out of memory */
    /*lint +e527 */
  }
  if (FRTOS1_xTaskCreate(
        Task3,  /* pointer to the task */
        "Task3", /* task name for kernel awareness debugging */
        configMINIMAL_STACK_SIZE, /* task stack size */
        (void*)NULL, /* optional task startup argument */
        tskIDLE_PRIORITY,  /* initial priority */
        (xTaskHandle*)NULL /* optional task handle to create */
      ) != pdPASS) {
    /*lint -e527 */
    for(;;){}; /* error! probably out of memory */
    /*lint +e527 */
  }
  if (FRTOS1_xTaskCreate(
        Task4,  /* pointer to the task */
        "Task4", /* task name for kernel awareness debugging */
        configMINIMAL_STACK_SIZE, /* task stack size */
        (void*)NULL, /* optional task startup argument */
        tskIDLE_PRIORITY,  /* initial priority */
        (xTaskHandle*)NULL /* optional task handle to create */
      ) != pdPASS) {
    /*lint -e527 */
    for(;;){}; /* error! probably out of memory */
    /*lint +e527 */
  }
  FRTOS1_vTaskStartScheduler();
}