Page 716 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 716
}
void RCC_Configuration (void)
{
SystemInit ();
RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1 | RCC_APB2Periph_GPIOA
|RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC
|RCC_APB2Periph_GPIOD | RCC_APB2Periph_GPIOE
|RCC_APB2Periph_ADC1 | RCC_APB2Periph_AFIO
|RCC_APB2Periph_SPI1, ENABLE );
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM4 | RCC_APB1Periph_USART2
|RCC_APB1Periph_USART3|RCC_APB1Periph_TIM2, ENABLE );
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
}
void Display ()
{
GLCD_init ();
colors (Magenta, Green); //text color, background
window ();
LCD_clear ();
}
void init_All_Periph ()
{
RCC_Configuration ();
NVIC_Configuration ();
GPIO_Configuration ();
USART1_Configuration();
USART2_Configuration();
}
int main (void)
{
init_All_Periph ();
Display ();
while (1)
{
}
}
- 709 -