/********************************* MDK-ARM Project ****************************
* Project Name:
* Firmware Library version: V3.5.0
* Author:
* Date: 2013.3.30
* Brief:
****************************************************************************
Attention:
******************************************************************************/
//************************** project header flie *******************************
#include "stm32f10x.h"
#include "userconfig.h"
//************************* project functions *********************************
/*===============================================================================
* Function Name: int main(void)
* Author:
* Date:
* Brief:
* Input parameters:
* Return value:
*--------------------------------------------------------------------------
* Attennion:
*-------------------------------------------------------------------------*/
int main(void)
{
uint32_t main_function_run_counter=0x0000 ;
uint16_t voltage1=1000,voltage2=0;
LCD_Initializtion();
RCC_Configuration();
GPIO_Configuration();
DAC_Configuration();
// DAC_SoftwareTriggerCmd(DAC_Channel_1,ENABLE);
//DAC_SoftwareTriggerCmd(DAC_Channel_2,ENABLE);
while (1)
{
if(main_function_run_counter>5000001) main_function_run_counter=0;
main_function_run_counter++;
if((main_function_run_counter%1000)==0)
{
key_display(); //scan key
display_adcware(1,1); //generate variable sounds
}
if((main_function_run_counter%100000)==0)
{
voltage1++;voltage2++;
if(voltage1>4095) voltage1=0;
if(voltage2>4095) voltage2=0;
// display_adcvalue(voltage1,voltage2); //display ADC channel's analog value
}
}
}
#ifdef USE_FULL_ASSERT
/*============================== function start ============================
* Function Name: assert_failed(uint8_t* file, uint32_t line)
* Author:
* Date:
* Brief: Reports the name of the source file and the source line number
where the assert_param error has occurred
* Input parameters: file: pointer to the source file name
line: assert_param error line source number
* Return value: none
*--------------------------------------------------------------------------
* Attennion:
*-------------------------------------------------------------------------*/
void assert_failed(uint8_t* file, uint32_t line)
{
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* Infinite loop */
while (1)
{
}
}
/*================================== function end ===========================*/
#endif
/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/