摘要: 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 阅读(1781) 评论(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 阅读(935) 评论(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 阅读(1953) 评论(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 阅读(1870) 评论(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 阅读(946) 评论(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 阅读(1026) 评论(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 阅读(1362) 评论(0) 推荐(0) 编辑
摘要: 1 u8 _data1[4]; 2 void Configuration(void) 3 { 4 USART_InitTypeDef USART_InitStructure; 5 DMA_InitTypeDef DMA_InitStructure; 6 GPIO_InitTypeDef GPIO_InitStructure; 7 RCC_APB1PeriphClo... 阅读全文
posted @ 2019-07-29 15:58 penuel 阅读(1260) 评论(0) 推荐(0) 编辑
摘要: 1 void Configuration(void) 2 { 3 USART_InitTypeDef USART_InitStructure; 4 GPIO_InitTypeDef GPIO_InitStructure; 5 RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3, ENABLE); 6 //TX 7 GPIO... 阅读全文
posted @ 2019-07-29 15:49 penuel 阅读(1593) 评论(0) 推荐(0) 编辑
摘要: 1 static void TIM3_Configuration(void) //10ms 2 { 3 TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; 4 NVIC_InitTypeDef NVIC_InitStructure; 5 6 RCC_APB1PeriphClockCmd(RCC_APB1Periph_TI... 阅读全文
posted @ 2019-07-29 15:42 penuel 阅读(1102) 评论(0) 推荐(0) 编辑