1024手机基地看电影,午夜福利视频导航,国产精品福利在线一区,亚洲欧美日韩另类成人,在线观看午夜日本理论片,成年超爽免费网站,国产精品成人免费,精品动作一级毛片,成人免费观看网站,97精品伊人久久大香蕉

標題: stm32串口中斷接收測試程序 [打印本頁]

作者: 756645036    時間: 2018-1-12 15:44
標題: stm32串口中斷接收測試程序

單片機源程序如下:
  1. /**
  2.   ******************************************************************************
  3.   * @file    main.c
  4.   * @author  fire
  5.   * @version V1.0
  6.   * @date    2013-xx-xx
  7.   * @brief   串口中斷接收測試
  8.   ******************************************************************************
  9.   
  10.   ******************************************************************************
  11.   */


  12. #include "stm32f10x.h"
  13. #include "bsp_usart1.h"
  14. #include "stdio.h"
  15. #include "timer4_cap.h"
  16. #include "UltrasonicWave.h"
  17. #include "delay.h"

  18. /**
  19.   * @brief  主函數
  20.   * @param  無
  21.   * @retval 無
  22.   */
  23. int main(void)
  24. {  
  25.         unsigned char count=0;
  26.         delay_init();
  27.                 /* USART1 配置模式為 115200 8-N-1,中斷接收 */
  28.         USART1_Config();
  29.        
  30.         NVIC_Configuration();
  31.   
  32.         TIM4_Cap_Init(0xffff,72-1); //以1Mhz的頻率計數

  33.   UltrasonicWave_Configuration();
  34.        
  35.         while(1)
  36.          {
  37.                 switch(count)
  38.                   {case 0:UltrasonicWave_StartMeasure();
  39.               count=1;
  40.                                       break;
  41.                          case 1:UltrasonicWave_StartMeasure2();
  42.              count=2;
  43.                                      break;       
  44.                         case 2:UltrasonicWave_StartMeasure3();
  45.              count=0;
  46.                                      break;               
  47. ……………………

  48. …………限于本文篇幅 余下代碼請從51黑下載附件…………
復制代碼

所有資料51hei提供下載:
Avatar_UltrasonicWave.rar (303.38 KB, 下載次數: 32)



作者: 小灰灰qq    時間: 2018-7-22 21:47
謝謝





歡迎光臨 (http://www.raoushi.com/bbs/) Powered by Discuz! X3.1