Beispiel #1
0
//-----------------------------------------------------
//处理接收到的数据
//return:1-收到命令正确;0-收到命令错误
void rece_dispatch()
{
	uint8_t len=buffer[0];
	uint8_t error=0;;
	if(buffer[1]!=0xfe || buffer[2]!=0x04 || (buffer[len]!=check_sum(&buffer[1],len-1)) )
	{
		//收到错误命令回复
		send_shakehand(0);
	}
	//解析命令
	switch(buffer[3])
	{
		case 0x01://确认命令
			break;
		case 0x02://初始化flash存储区
			flash_init();
			break;
		case 0x03://收到时间设置命令
			RTC_Set_datetime(&buffer[5]);
			RTC_AlarmConfig(buffer[8],buffer[9]+1);
			//SEGGER_RTT_printf(0,"set_time=%02d-%02d-%02d;%02d-%02d-%02d;\r\n",buffer[5],buffer[6],buffer[7],buffer[8],buffer[9],buffer[10]);
			break;
		case 0x04://step length
			sys_para.step_len=buffer[5];
			sys_para.height=*(uint16_t *)(&buffer[6]);
			//flash_erase_para_sector();
			break;
		case 0x05://return serial number
			send_version_info();		
			break;
		case 0x0a://模式切换
			if(buffer[5]>0x03)
				error=1;
			else
				curr_mode=buffer[5];
			break;
		case 0x06://read now  sports data
			send_sensor_data();
			break;
		case 0x09://中断批量传输
			bat_upload=0;
			break;
		default:
			send_shakehand(0);//收到异常命令S
			return;
	};
		SEGGER_RTT_printf(0,"rece comm=%x;\r\n",buffer[3]);

	if(buffer[3]!=0x01)
	{
		//回复确认收到
		if(error==0)
			send_shakehand(1);
		else
			send_shakehand(0);
	}

}
Beispiel #2
0
/**
  * @brief  Main program.
  * @param  None
  * @retval None
  */
int main(void)
{
  /*!< At this stage the microcontroller clock setting is already configured, 
       this is done through SystemInit() function which is called from startup
       files (startup_stm32f40_41xxx.s/startup_stm32f427_437xx.s/startup_stm32f429_439xx.s)
       before to branch to application main.
     */  
  
  /* Initialize the LCD */
  LCD_Init(); 
  
  /* Clear the LCD */ 
  LCD_Clear(White);

  /* Set the LCD Back Color */
  LCD_SetBackColor(Blue);
  
  /* Set the LCD Text Color */
  LCD_SetTextColor(White);
   
  /* Displays MESSAGE1 on line 0 */
  LCD_DisplayStringLine(LINE(0), (uint8_t *)MESSAGE1);

  /* RTC configuration */
  RTC_Config();
  
  /* Set the LCD Text Color */
  LCD_SetTextColor(Red);
  
  /* Displays a rectangle on the LCD */
  LCD_DrawRect(80, 290, 25, 240 );
  
  /* Configure the external interrupt "KEY", "WAKEUP" and "TAMPER" buttons */
  STM_EVAL_PBInit(BUTTON_KEY, BUTTON_MODE_EXTI);
  STM_EVAL_PBInit(BUTTON_WAKEUP, BUTTON_MODE_EXTI);
  STM_EVAL_PBInit(BUTTON_TAMPER, BUTTON_MODE_EXTI);  
     
  /* Configure RTC alarm A register to generate 8 interrupts per 1 Second */
  RTC_AlarmConfig();
  
  /* set LCD Font */
  LCD_SetFont(&Font12x12);

  /* Set the LCD Back Color */
  LCD_SetBackColor(White); 

  /* Set the LCD Text Color */
  LCD_SetTextColor(Black);

  /* Displays MESSAGE2 and MESSAGE3 on the LCD */
  LCD_DisplayStringLine(LINE(18), (uint8_t *)MESSAGE2);  
  LCD_DisplayStringLine(LINE(19), (uint8_t *)MESSAGE3);  

  /* Infinite loop */
  while (1)
  {}
}
Beispiel #3
0
/**
  * @brief  Main program
  * @param  None
  * @retval None
  */
int main(void)
{
  /* STM32F4xx HAL library initialization:
       - Configure the Flash prefetch
       - Systick timer is configured by default as source of time base, but user 
         can eventually implement his proper time base source (a general purpose 
         timer for example or other time source), keeping in mind that Time base 
         duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and 
         handled in milliseconds basis.
       - Set NVIC Group Priority to 4
       - Low Level Initialization
     */
  HAL_Init();

  /* Configure the system clock to 180 MHz */
  SystemClock_Config();

  /* Configure LED1 and LED3 */
  BSP_LED_Init(LED1);
  BSP_LED_Init(LED3);

  /*##-1- Configure the RTC peripheral #######################################*/
  RtcHandle.Instance = RTC;

  /* Configure RTC prescaler and RTC data registers */
  /* RTC configured as follows:
      - 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- Configure Alarm ####################################################*/
  /* Configure RTC Alarm */
  RTC_AlarmConfig();
  
  /* Infinite loop */  
  while (1)
  {
    /*##-3- Display the updated Time #########################################*/
    RTC_TimeShow(aShowTime);
  }
}
/**
  * @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 LED1 and LED3 */
  BSP_LED_Init(LED1);
  BSP_LED_Init(LED3);

  /* Configure the system clock to 168 MHz */
  SystemClock_Config();

  /*##-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- Configure Alarm ####################################################*/
  /* Configure RTC Alarm */
  RTC_AlarmConfig();

  /* Infinite loop */
  while (1)
  {
    /*##-3- Display the updated Time #########################################*/
    RTC_TimeShow(aShowTime);
  }
}
Beispiel #5
0
/**
  * @brief  Main program
  * @param  None
  * @retval None
  */
int main(void)
{
  /* STM32F103xB HAL library initialization:
       - Configure the Flash prefetch
       - Systick timer is configured by default as source of time base, but user 
         can eventually implement his proper time base source (a general purpose 
         timer for example or other time source), keeping in mind that Time base 
         duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and 
         handled in milliseconds basis.
       - Set NVIC Group Priority to 4
       - Low Level Initialization
     */
  HAL_Init();

  /* Configure the system clock to 64 MHz */
  SystemClock_Config();

  /* Configure LED_GREEN */
  BSP_LED_Init(LED_GREEN);

  /*##-1- Configure the RTC peripheral #######################################*/
  RtcHandle.Instance = RTC;

  /* Configure RTC prescaler and RTC data registers */
  /* RTC configured as follows:
      - Asynch Prediv  = Automatic calculation of prediv for 1 sec timebase
  */
  RtcHandle.Init.AsynchPrediv = RTC_AUTO_1_SECOND;
  if (HAL_RTC_Init(&RtcHandle) != HAL_OK)
  {
    /* Initialization Error */
    Error_Handler();
  }

  /*##-2- Configure Alarm ####################################################*/
  /* Configure RTC Alarm */
  RTC_AlarmConfig();
  
  /* Infinite loop */  
  while (1)
  {
    /*##-3- Display the updated Time #########################################*/
    RTC_TimeShow(aShowTime);
  }
}
Beispiel #6
0
/**
  * @brief  Main program.
  * @param  None
  * @retval None
  */
int main(void)
{
  /*!< At this stage the microcontroller clock setting is already configured, 
       this is done through SystemInit() function which is called from startup
       file (startup_stm32l1xx_xx.s) before to branch to application main.
       To reconfigure the default setting of SystemInit() function, refer to
       system_stm32l1xx.c file
     */
 
  uint32_t index = 0, tmp=0 ;
  
  /* Initialize the LCD */
  STM32L152D_LCD_Init(); 
  
  /* Clear the LCD */ 
  LCD_Clear(White);
  
  /* Set the LCD Back Color */
  LCD_SetBackColor(Blue);
  
  /* Set the LCD Text Color */
  LCD_SetTextColor(White);
  
  /* Displays MESSAGE1 on line 1 */
  LCD_DisplayStringLine(LINE(0), (uint8_t *)MESSAGE1);
  
  /* Set the LCD Back Color */
  LCD_SetBackColor(Cyan);
  
  /* Set the LCD Text Color */
  LCD_SetTextColor(Black);
  
  /* Draw lines */
  LCD_DrawUniLine(69, 121, 69,20);
  LCD_DrawUniLine(171, 121, 171, 20);
  
  /* Draw 4 lines  */
  LCD_DrawUniLine(70, 121, 120, 71);
  LCD_DrawUniLine(120, 71, 170,121);
  LCD_DrawUniLine(70, 20, 120, 70);
  LCD_DrawUniLine(120, 70, 170,20);
  
  /* Initailize the Display Picture */  
  for (index = 0; index < 100 ; index++)
  {
    if ((index % 2) ==0)
    {
      /* Set the LCD Text Color */
      LCD_SetTextColor(Blue);
      /* Draw Horizontal line */
      LCD_DrawLine(70 + (index/2) , 120 - (index/2)  , 101 - (index + 1) ,Horizontal);
      /* Set the LCD Text Color */
      LCD_SetTextColor(White);
      /* Draw Horizontal line */
      LCD_DrawLine(170 - (index/2) , 120 - (index/2)  , 101 - (index + 1) ,Horizontal);
    }
  }
  
  /* Set the LCD Text Color */
  LCD_SetTextColor(Blue); 
  /* Set the LCD Back Color */
  LCD_SetBackColor(White);
  
  /* Display String on the LCD  */
  LCD_DisplayStringLine(LINE(3), " Set Timer:");
  LCD_DisplayStringLine(95,     "   01:00 ");  
  
  /* Initialize Timer to 60 seconds */
  SecondNumb = 60;
  
  /* Configure the external interrupt "LEFT", "RIGHT" , "DOWN" and "UP" buttons */
  STM_EVAL_PBInit(BUTTON_RIGHT, BUTTON_MODE_EXTI);
  STM_EVAL_PBInit(BUTTON_LEFT, BUTTON_MODE_EXTI);
  STM_EVAL_PBInit(BUTTON_UP, BUTTON_MODE_EXTI);
  STM_EVAL_PBInit(BUTTON_DOWN, BUTTON_MODE_EXTI);
  
  /* Configure DOWN button in GPIO mode */  
   STM_EVAL_PBInit(BUTTON_DOWN, BUTTON_MODE_GPIO);  
  
  /* Configure the RTC peripheral by selecting the clock source.*/
  RTC_Config();
 
  /* Configure RTC AlarmA register to generate 8 interrupts per 1 Second */
  RTC_AlarmConfig();
  
  /* Set Text and Back color and Text size */
  LCD_SetFont(&Font12x12);
  LCD_SetBackColor(Cyan);
  LCD_SetTextColor(Black);
  LCD_DisplayStringLine(LINE(18), (uint8_t *)MESSAGE2);
  
  /* Set the LCD Back Color */
  LCD_SetBackColor(Blue);
  LCD_SetTextColor(White);
  LCD_DisplayStringLine(LINE(19), (uint8_t *)MESSAGE3);
  LCD_SetFont(&Font16x24);

  while (1)
  {
    /* Check on the event 'start' */
    if(StartEvent == 8)
    {
      /* Check on the Alarm event counter */
      if(RTCAlarmCount != 0 ) 
      {
        tmp = (uint32_t) ((RTCAlarmCount * 100)/ (8 * SecondNumb)); 
        
        /* First */
        Delay((1000* SecondNumb));
        
        LCD_SetTextColor(Blue);
        LCD_DrawLine(120, 70, 2, Vertical);
        LCD_DrawLine(122, 68, 2, Vertical);
        LCD_DrawLine(122, 72, 2, Vertical);
        if(tmp <= 72)
        {  
          LCD_SetTextColor(White);
          LCD_DrawLine(130, 70, 2, Vertical);
          LCD_DrawLine(132, 68, 2, Vertical);
          LCD_DrawLine(132, 72, 2, Vertical);
        }
        LCD_SetTextColor(Blue);
        LCD_DrawLine(140, 70, 2, Vertical);
        LCD_DrawLine(142, 69, 2, Vertical);
        LCD_DrawLine(142, 72, 2, Vertical);
        
        /* Second */
        Delay((1000*SecondNumb));
        if(tmp <= 90)
        { 
          LCD_SetTextColor(White);
          LCD_DrawLine(120, 70, 2, Vertical);
          LCD_DrawLine(122, 68, 2, Vertical);
          LCD_DrawLine(122, 72, 2, Vertical);
        }
        LCD_SetTextColor(Blue);
        LCD_DrawLine(130, 70, 2, Vertical);
        LCD_DrawLine(132, 68, 2, Vertical);
        LCD_DrawLine(132, 72, 2, Vertical);
        if(tmp <= 52)
        { 
          LCD_SetTextColor(White);
          LCD_DrawLine(140, 70, 2, Vertical);
          LCD_DrawLine(142, 68, 2, Vertical);
          LCD_DrawLine(142, 72, 2, Vertical);
        }
      }
    }
    else if (StartEvent == 9)
    {
      LCD_SetTextColor(Blue);
      LCD_DrawLine(120, 70, 2, Vertical);
      LCD_DrawLine(122, 68, 2, Vertical);
      LCD_DrawLine(122, 72, 2, Vertical);
      
      LCD_DrawLine(130, 70, 2, Vertical);
      LCD_DrawLine(132, 68, 2, Vertical);
      LCD_DrawLine(132, 72, 2, Vertical);
      
      LCD_DrawLine(140, 70, 2, Vertical);
      LCD_DrawLine(142, 68, 2, Vertical);
      LCD_DrawLine(142, 72, 2, Vertical);
    }
    else
    {
      if(tmp <= 90)
      { 
        LCD_SetTextColor(White);
      }
      else
      {
        LCD_SetTextColor(Blue);
      }
      LCD_DrawLine(120, 70, 2, Vertical);
      LCD_DrawLine(122, 68, 2, Vertical);
      LCD_DrawLine(122, 72, 2, Vertical);
      
      if(tmp <= 72)
      { 
        LCD_SetTextColor(White);
      }
      else
      {
        LCD_SetTextColor(Blue);
      }
      LCD_DrawLine(130, 70, 2, Vertical);
      LCD_DrawLine(132, 68, 2, Vertical);
      LCD_DrawLine(132, 72, 2, Vertical);
      
      if(tmp <= 52)
      { 
        LCD_SetTextColor(White);
      }
      else
      {
        LCD_SetTextColor(Blue);
      }
      LCD_DrawLine(140, 70, 2, Vertical);
      LCD_DrawLine(142, 68, 2, Vertical);
      LCD_DrawLine(142, 72, 2, Vertical);
      
    }
  }
}
Beispiel #7
0
/**
  * @brief  Main program.
  * @param  None
  * @retval None
  */
int main(void)
{
  /*!< At this stage the microcontroller clock setting is already configured, 
       this is done through SystemInit() function which is called from startup
       file (startup_stm32f0xx.s) before to branch to application main.
       To reconfigure the default setting of SystemInit() function, refer to
       system_stm32f0xx.c file
     */  
  
  /* Initialize the LCD */
#ifdef USE_STM320518_EVAL
    STM320518_LCD_Init();
#else
    STM32072B_LCD_Init();
#endif /* USE_STM320518_EVAL */
         
  /* Enable The Display */
  LCD_DisplayOn(); 

  /* Clear the Background Layer */ 
  LCD_Clear(LCD_COLOR_WHITE);
  
  /* Clear the LCD */ 
  LCD_Clear(White);

  /* Set the LCD Back Color */
  LCD_SetBackColor(Blue);
  
  /* Set the LCD Text Color */
  LCD_SetTextColor(White);
   
  /* Displays MESSAGE1 on line 0 */
  LCD_DisplayStringLine(LINE(0), (uint8_t *)MESSAGE1);

  /* RTC configuration */
  RTC_Config();
  
  /* Set the LCD Text Color */
  LCD_SetTextColor(Red);
  
  /* Displays a rectangle on the LCD */
  LCD_DrawRect(80, 280, 25, 240 );
  
  /* Configure the external interrupt "WAKEUP" and "TAMPER" buttons */
  STM_EVAL_PBInit(BUTTON_SEL, BUTTON_MODE_EXTI);
  STM_EVAL_PBInit(BUTTON_TAMPER, BUTTON_MODE_EXTI);  
     
  /* Configure RTC AlarmA register to generate 8 interrupts per 1 Second */
  RTC_AlarmConfig();
  
  /* set LCD Font */
  LCD_SetFont(&Font12x12);

  /* Set the LCD Back Color */
  LCD_SetBackColor(White); 

  /* Set the LCD Text Color */
  LCD_SetTextColor(Black);
  
  /* Set the Back Color */
  LCD_SetBackColor(LCD_COLOR_CYAN);
  /* Displays MESSAGE2 and MESSAGE3 on the LCD */
  LCD_DisplayStringLine(LINE(18), (uint8_t *)MESSAGE2);  
  LCD_DisplayStringLine(LINE(19), (uint8_t *)MESSAGE3);  

  /* Infinite loop */
  while (1)
  {
    uint32_t tmp =0;
    /* ALARM Interrupt */
    if (ALARM_Occured)
    {
      if(RTCAlarmCount != 480)
      {
        /* Increament the counter of Alarma interrupts */
        RTCAlarmCount++;
        
        /* Set the LCD Back Color */
        LCD_SetTextColor(Green);
        
        /* Draw rectangle on the LCD */
        LCD_DrawFullRect(81, 359, 80+ (((RTCAlarmCount)-1)/2) , 24);
        
        /* Set the LCD text color */
        LCD_SetTextColor(Red);
        
        /* Display rectangle on the LCD */
        LCD_DrawRect(80, 280, 25, 240 );
        
        /* Define the rate of Progress bar */
        tmp = (RTCAlarmCount * 100)/ 480; 
        
        /* Set the LCD Font */
        LCD_SetFont(&Font16x24);
        
        /* Display Char on the LCD : XXX% */
        LCD_DisplayChar(LINE(2),200, (tmp / 100) +0x30);
        LCD_DisplayChar(LINE(2),180, ((tmp  % 100 ) / 10) +0x30);
        LCD_DisplayChar(LINE(2),160, (tmp % 10) +0x30);
        LCD_DisplayChar(LINE(2),140, 0x25);
      }
      else
      {
        /* Disable the RTC Clock */
        RCC_RTCCLKCmd(DISABLE);
        
      }
      /* Reinitialize the ALARM variable */
      ALARM_Occured = 0;
    }
  }
}
Beispiel #8
0
int main(void) {
	FRESULT fresult;

	NVIC_InitTypeDef nvicStructure;

	SystemInit();

	GPIO_Config();
	SPI_Config();
	/*
	 for(i1=0;i1<TABLE_SIZE;i1++){
	 buffer[0][i1] = 4*i1;
	 }

	 for(i1=0;i1<TABLE_SIZE;i1++){
	 buffer[1][i1] = 2047*sin(currentPhase)+2047;
	 currentPhase += phaseIncrement;
	 }
	 */

	/* Configure LED3 and LED4 on STM32L100C-Discovery */
	STM_EVAL_LEDInit(LED3);
	STM_EVAL_LEDInit(LED4);



	/* SysTick end of count event each 1ms */
	//RCC_GetClocksFreq(&RCC_Clocks);
	// SysTick_Config(RCC_Clocks.HCLK_Frequency / 1000);
	//delay_init(72);//
	delay_init(16);
	Lcd_Init2();

	Lcd_Clear2(BLACK);

	/* RTC configuration */
	//RTC_Config();
	RTC_Config32768Internal();

	/* Configure RTC alarm A register to generate 8 interrupts per 1 Second */
	RTC_AlarmConfig();

	tft_puts(45, 20, "12:00", white, black);

	RCC_ClocksTypeDef RCC_Clocks;

	/* Initialize User_Button on STM32L100C-Discovery */
	STM_EVAL_PBInit(BUTTON_MODE, BUTTON_MODE_GPIO);
	STM_EVAL_PBInit(BUTTON_UP, BUTTON_MODE_GPIO);
	STM_EVAL_PBInit(BUTTON_DOWN, BUTTON_MODE_GPIO);
	//STM_EVAL_PBInit(BUTTON_MODE, BUTTON_MODE_EXTI);

	/* SysTick end of count event each 1ms */
	//   RCC_GetClocksFreq(&RCC_Clocks);
	//   SysTick_Config(RCC_Clocks.HCLK_Frequency / 1000);

	/*************************/

	//TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
	RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);

	nvicStructure.NVIC_IRQChannel = TIM2_IRQn;
	nvicStructure.NVIC_IRQChannelPreemptionPriority = 0;
	nvicStructure.NVIC_IRQChannelSubPriority = 1;
	nvicStructure.NVIC_IRQChannelCmd = ENABLE;
	NVIC_Init(&nvicStructure);

	TIM_TimeBaseInitTypeDef timerInitStructure;
	timerInitStructure.TIM_Prescaler = 3200; //32 MHz/3200 = 10000
	timerInitStructure.TIM_CounterMode = TIM_CounterMode_Up;
	//timerInitStructure.TIM_Period = 3332;
	timerInitStructure.TIM_Period = 100; //10 000/100 = 100 Hz - sampling frequency of buttons
	timerInitStructure.TIM_ClockDivision = TIM_CKD_DIV1;

	//timerInitStructure.TIM_RepetitionCounter = 0;
	TIM_TimeBaseInit(TIM2, &timerInitStructure);
	TIM_ITConfig(TIM2, TIM_IT_Update, ENABLE);
	TIM_Cmd(TIM2, ENABLE);

	/*************************/

	//GPIO_PinAFConfig(GPIOA, GPIO_PinSource4, GPIO_AF_SPI1);
	GPIO_PinAFConfig(GPIOA, GPIO_PinSource5, GPIO_AF_SPI1);
	GPIO_PinAFConfig(GPIOA, GPIO_PinSource6, GPIO_AF_SPI1);
	GPIO_PinAFConfig(GPIOA, GPIO_PinSource7, GPIO_AF_SPI1);





	fresult = f_mount(&g_sFatFs, "0:0", 1);

	//LCD_BMP("kasia.bmp");

	//Gui_DrawFont_GBK24_bk(20,120, BLUE, WHITE, "1234 abcd");

	//playWav("rct3.wav"); // fsamp 22050 Hz, 8bit



	/* tests */
	//playWav("m8m.wav"); // fsamp 44100 Hz, 8 bit
	//playWav("bj8.wav"); // fsamp 44100 Hz, 8 bit
	//playWav("im16.wav");  // fsamp 44100 Hz, 16 bit

	//playWavFromIntMemory(rooster3);


	displayDate();

	while (1) {
		if (updated) {
			displayTime();
			updated = false;

			if(updateDate){
							updateAndDisplayDate();
							updateDate = false;
					}

		}





	}

}