Ejemplo n.º 1
0
/**
  * @brief Example main entry point.
  * @par Parameters:
  * None
  * @retval 
  * None
  */
void main(void)
{

    u8 i = 0;
		u16 Timer2Count;

    /* Configuration of the GPIO*/
		GPIO_Configuration();
		
		/* Clock divider to HSI/1 */
    CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1);

    /* BEEP calibration */
    BEEP_LSICalibrationConfig(LSIMeasurment());
		
		/* TS Library Initialisation */
		TSL_Init();

    /* TS Application Initialisation */
		ExtraCode_Init();

		/* Tim2 Configuration */
		InitializeTim2();

    while (1)
    {
			ExtraCode_StateMachine();
			TSL_Action();
			BeepDriver_Action();
			//SubCounterSounds();
    }

}
Ejemplo n.º 2
0
/**
  ******************************************************************************
  * @brief Main function.
  * @par Parameters:
  * None
  * @retval void None
  * @par Required preconditions:
  * None
  ******************************************************************************
  */
void main(void)
{

  /* Configures clocks */
  CLK_Configuration();

  /* Configures GPIOs */
  GPIO_Configuration();

  /* Initialize Touch Sensing library */
  TSL_Init();

	/* Initialize all the Touch Sensing keys */
  ExtraCode_Init();

  /* Start the 100ms timebase Timer */
  TSL_Tick_Flags.b.User_Start_100ms = 1;

  for (;;)
  {
    /* User code */
    ExtraCode_StateMachine();

	  /* Main function of the Touch Sensing library */
    TSL_Action();

  }

}