摘要: 1 static void GPIO_Init(void) 2 { 3 4 //sound 5 GPIO_Set(GPIOB,PIN4,GPIO_MODE_OUT,GPIO_OTYPE_PP,GPIO_SPEED_50M,GPIO_PUPD_NONE);//复用功能 6 PBout(4)=0; 7 8 //24路ADC采集 9 GPIO_Set... 阅读全文
posted @ 2019-07-29 17:30 penuel 阅读(1867) 评论(0) 推荐(0)
摘要: 1 static void RCC_Init(void) 2 { 3 RCC->APB1ENR|=1APB1ENR|=1APB2ENR|=1APB2ENR|=1APB2ENR|=1APB2ENR|=1APB2ENR|=1AHB1ENR|=1; //使能PORTA时钟 12 RCC->AHB1ENR|=1AHB1ENR|=1AHB1ENR|=1AHB1ENR|=1AHB1ENR... 阅读全文
posted @ 2019-07-29 17:29 penuel 阅读(2007) 评论(0) 推荐(0)
摘要: SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOA, EXTI_PinSource0); EXTI_InitStructure.EXTI_Line=EXTI_Line0; EXTI_InitStructure.EXTI_LineCmd=ENABLE; EXTI_InitStructure.EXTI... 阅读全文
posted @ 2019-07-29 17:25 penuel 阅读(1633) 评论(0) 推荐(0)
摘要: static void ADC_Config(void) { ADC_InitTypeDef ADC_InitStructure; /* ADCs DeInit */ //ADC_DeInit(ADC1); /* Initialize ADC structure */ ADC_StructInit(&ADC_InitStructure); ... 阅读全文
posted @ 2019-07-29 17:21 penuel 阅读(1985) 评论(0) 推荐(0)
摘要: void TIM1_Configuration(void) { TIM_TimeBaseInitTypeDef TIM_Time1BaseStructure; TIM_OCInitTypeDef TIM_OCInitStructure; RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM1, ENABLE); /* Time 定时基础设置*... 阅读全文
posted @ 2019-07-29 17:20 penuel 阅读(988) 评论(0) 推荐(0)
摘要: 1 void GPIO_Configuration(void) 2 { 3 RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE); 4 RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOB, ENABLE); 5 6 /* Configure ADC Channel as analog... 阅读全文
posted @ 2019-07-29 17:19 penuel 阅读(2141) 评论(0) 推荐(0)
摘要: 1 void _TIM4_Configuration(void) 2 { 3 /* TIM4 Configuration --------------------------------------------------- 4 Generates 7 PWM signals with 4 different duty cycles: 5 TIM4CL... 阅读全文
posted @ 2019-07-29 17:03 penuel 阅读(1966) 评论(0) 推荐(0)
摘要: 1 void _UART2_Configuration(void) 2 { 3 USART_InitTypeDef USART_InitStructure; 4 5 USART_OverSampling8Cmd(USART2, ENABLE); 6 USART_InitStructure.USART_BaudRate = 19200; 7 USART_Init... 阅读全文
posted @ 2019-07-29 17:01 penuel 阅读(1054) 评论(0) 推荐(0)
摘要: 1 void _DMA_Configuration(void) 2 { 3 DMA_InitTypeDef DMA_InitStructure; 4 5 /* DMA2 Stream0 channel0 configuration */ 6 DMA_InitStructure.DMA_Channel = DMA_Channel_0; 7 DMA_Init... 阅读全文
posted @ 2019-07-29 16:59 penuel 阅读(1152) 评论(0) 推荐(0)
摘要: 1 void ADC_Configure(void) 2 { 3 ADC_InitTypeDef ADC_InitStructure; 4 GPIO_InitTypeDef GPIO_InitStructure; 5 RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1,ENABLE); 6 RCC_AHBPeriphClock... 阅读全文
posted @ 2019-07-29 16:17 penuel 阅读(1484) 评论(0) 推荐(0)