Ejemplo n.º 1
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.                    ***/

  /* Write your code here */
  LEDR_Neg();
  WAIT1_Waitms(100);
  LEDG_Neg();
  WAIT1_Waitms(100);
  LEDB_Neg();
  WAIT1_Waitms(100);
  LEDY_Neg();
  WAIT1_Waitms(100);
  
  APP_Run();
  /* 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!!! ***/
Ejemplo n.º 2
0
static portTASK_FUNCTION(MainTask, pvParameters) {
  (void)pvParameters; /* not used */
#if PL_HAS_TSS
  Configure(); /* initialize TSS library */
#endif
  for(;;) {
#if PL_HAS_TSS
    TSS_Task(); /* call TSS library to process touches */
#else
    CheckButton();
#endif
#if PL_APP_FOLLOW_OBSTACLE
    FollowObstacle();
#endif
#if PL_HAS_LED_BLUE
    LEDB_Neg();
#endif
#if PL_HAS_RADIO
    (void)RADIO_Handle();
#endif
#if PL_HAS_EVENTS
    EVNT_HandleEvent(RADIO_AppHandleEvent);
#endif
    StateMachine(FALSE);
    FRTOS1_vTaskDelay(10/portTICK_RATE_MS);
  }
}
Ejemplo n.º 3
0
void blink_blue(const int n)
{
	int i;
	i = 0;
	for (i = 0; i < (2*n); i++) {
		LEDB_Neg();
		WAIT1_Waitms(BLINKTIME);
	}
	LEDB_Off();
}
Ejemplo n.º 4
0
int main(void) {
  PE_low_level_init(); /* low level driver initialization, do not remove */

  for(;;) {
     /* add your code here */
     LEDB_Neg();
     printf("hello world!\r\n");
     WAIT1_Waitms(1000);
  }
  /* do not leave main! */
  return 0;
}
Ejemplo n.º 5
0
void switchLEDs(unsigned char ch) {
	switch (ch) {
	case 'r':
		LEDR_Neg();
		break;
	case 'g':
		LEDG_Neg();
		break;
	case 'b':
		LEDB_Neg();
		break;
	default:
		LED_Neg();
		break;
	}
}
Ejemplo n.º 6
0
static portTASK_FUNCTION(MainTask, pvParameters) {
  (void)pvParameters; /* not used */
#if PL_USE_TSS
  Configure(); /* initialize TSS library */
#endif
  for(;;) {
#if PL_USE_TSS
    TSS_Task(); /* call TSS library to process touches */
#else
    CheckButton();
#endif
#if PL_HAS_LED_BLUE
    LEDB_Neg();
#endif
    StateMachine(FALSE);
    FRTOS1_vTaskDelay(10/portTICK_RATE_MS);
  }
}
Ejemplo n.º 7
0
static void LED_Neg(void) {
	LEDR_Neg();
	LEDG_Neg();
	LEDB_Neg();
}