Beispiel #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 */
	/* For example: for(;;) { } */

	Boot_Check();
	AD1_Calibrate(TRUE);
	OLED_Init();
	unsigned char buffer[64*4];
	ClearScr(buffer,0);
	OLED_Display(buffer);
	DecoderInit();
	int T = 0;
	for(;;) {
		T++;
		ClearScr(buffer,0);
		for (int x = 0;x<64;x++)
		{
			buffer[Reader.Sync * 64 + x] = 255;
		}

		if (Reader.Sync == AUDIOREADER_SYNCED)
		{
			for (int i =0;i<theprogress/8;i++)
			{
				buffer[i] = 0xff;
			}

		}
		//else
		{
			for(int i =0 ;i<64;i++)
			{
				int y =  16 + (((History[i]-32768) * 15)/400);
				if (y>= 0 && y< 32) SetPixel(buffer, i, y);
			}
		}
		OLED_Display(buffer);

	}
	/*** 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!!! ***/
Beispiel #2
0
static portTASK_FUNCTION(T1, pvParameters) {
#if PL_HAS_ACCEL
	ACCEL_LowLevelInit();
#endif
#if PL_HAS_REMOTE
	remoteInit();
#endif
#if PL_HAS_ANALOG_JOY
	AD1_Calibrate(TRUE);
	CalibXY();
#endif
#if PL_HAS_FIGHT
	FIGHT_Init();
#endif
#if REMOTE_WITHOUT_REFLECTANCE
	FRTOS1_vTaskSuspend(checkRefl);
#endif
  for(;;) {
	EVNT_SetEvent(EVNT_LED_HEARTBEAT);
    FRTOS1_vTaskDelay(1000/TRG_TICKS_MS);
  }
}