|
|
|
|
@ -39,20 +39,20 @@ void rt_hw_board_init()
|
|
|
|
|
*/
|
|
|
|
|
static void RCC_Configuration(void)
|
|
|
|
|
{
|
|
|
|
|
//下面是给各模块开启时钟
|
|
|
|
|
//启动GPIO
|
|
|
|
|
//下面是给各模块开启时钟
|
|
|
|
|
//启动GPIO
|
|
|
|
|
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | \
|
|
|
|
|
RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD | \
|
|
|
|
|
RCC_APB2Periph_GPIOE | RCC_APB2Periph_GPIOG,
|
|
|
|
|
ENABLE);
|
|
|
|
|
|
|
|
|
|
//启动AFIO
|
|
|
|
|
//启动AFIO
|
|
|
|
|
RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);
|
|
|
|
|
//启动USART1时钟
|
|
|
|
|
//启动USART1时钟
|
|
|
|
|
RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, ENABLE);
|
|
|
|
|
//启动USART2时钟
|
|
|
|
|
//启动USART2时钟
|
|
|
|
|
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, ENABLE);
|
|
|
|
|
//启动DMA时钟
|
|
|
|
|
//启动DMA时钟
|
|
|
|
|
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
|
|
|
|
|
/* Enable ADC1 and GPIOC clock */
|
|
|
|
|
RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE);
|
|
|
|
|
|