欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標題: TimerMode.h頭文件下載-AVR定時器工作模式名稱定義 [打印本頁]

作者: daming    時間: 2014-12-30 12:33
標題: TimerMode.h頭文件下載-AVR定時器工作模式名稱定義
本帖最后由 daming 于 2014-12-30 12:39 編輯

在代碼下方點復制代碼,然后另存到電腦磁盤即可下載.


  1. /*****************************************************************************

  2.       單    位:廣西民族大學物理與電子工程學院07物本班
  3.       文件名稱:TimerMode.h
  4.       文件標識:_TIMERMODE_H_
  5.       摘    要:AVR定時器工作模式名稱定義
  6.       當前版本:V1.0
  7.       作    者: 【白 羽】
  8.       完成日期:2010年11月16日

  9. *****************************************************************************/
  10. #ifndef  _TIMERMODE_H_
  11. #define  _TIMERMODE_H_



  12. #define  TimerMode(X,MODE)     _TimerMode(X,MODE)
  13. #define  _TimerMode(X,MODE)    TIMER##X##_##MODE


  14. //以名稱命名
  15. #define  TIMER0_NORMAL         0               //普通模式
  16. #define  TIMER0_PPWM           1               //相位可調PWM
  17. #define  TIMER0_CTC            2               //CTC模式
  18. #define  TIMER0_PWM            3               //快速PWM

  19. #define  TIMER1_NORMAL         0               //普通模式
  20. #define  TIMER1_PPWM8          1               //8位相位可調PWM
  21. #define  TIMER1_PPWM9          2               //9位相位可調PWM
  22. #define  TIMER1_PPWM10         3               //10位相位可調PWM
  23. #define  TIMER1_CTC            4               //CTC模式
  24. #define  TIMER1_PWM8           5               //8位快速PWM
  25. #define  TIMER1_PWM9           6               //9位快速PWM
  26. #define  TIMER1_PWM10          7               //10位快速PWM
  27. #define  TIMER1_PFPWM_ICR1     8               //ICR1為TOP的相頻可調PWM
  28. #define  TIMER1_PFPWM_OCR1A    9               //OCR1A為TOP的相頻可調PWM
  29. #define  TIMER1_PPWM_ICR1      10              //ICR1為TOP的相位可調PWM
  30. #define  TIMER1_PPWM_OCR1A     11              //OCR1A為TOP的相位可調PWM
  31. #define  TIMER1_CTC_ICR1       12              //ICR1為匹配值的CTC模式
  32. #define  TIMER1_SAVE           13              //保留
  33. #define  TIMER1_PWM_ICR1       14              //ICR1為TOP值的快速PWM
  34. #define  TIMER1_PWM_OCR1A      15              //OCR1A為TOP值的快速PWM

  35. #define  TIMER2_NORMAL         0               //普通模式
  36. #define  TIMER2_PPWM           1               //相位可調PWM
  37. #define  TIMER2_CTC            2               //CTC模式
  38. #define  TIMER2_PWM            3               //快速PWM

  39. #define  TIMER3_NORMAL         0               //普通模式
  40. #define  TIMER3_PPWM8          1               //8位相位可調PWM
  41. #define  TIMER3_PPWM9          2               //9位相位可調PWM
  42. #define  TIMER3_PPWM10         3               //10位相位可調PWM
  43. #define  TIMER3_CTC            4               //CTC模式
  44. #define  TIMER3_PWM8           5               //8位快速PWM
  45. #define  TIMER3_PWM9           6               //9位快速PWM
  46. #define  TIMER3_PWM10          7               //10位快速PWM
  47. #define  TIMER3_PFPWM_ICR1     8               //ICR3為TOP的相頻可調PWM
  48. #define  TIMER3_PFPWM_OCR1A    9               //OCR3A為TOP的相頻可調PWM
  49. #define  TIMER3_PPWM_ICR1      10              //ICR3為TOP的相位可調PWM
  50. #define  TIMER3_PPWM_OCR1A     11              //OCR3A為TOP的相位可調PWM
  51. #define  TIMER3_CTC_ICR1       12              //ICR3為匹配值的CTC模式
  52. #define  TIMER3_SAVE           13              //保留
  53. #define  TIMER3_PWM_ICR1       14              //ICR3為TOP值的快速PWM
  54. #define  TIMER3_PWM_OCR1A      15              //OCR3A為TOP值的快速PWM


  55. //以數字命名
  56. #define  TIMER0_0              0               //普通模式
  57. #define  TIMER0_1              1               //相位可調PWM
  58. #define  TIMER0_2              2               //CTC模式
  59. #define  TIMER0_3              3               //快速PWM

  60. #define  TIMER1_0              0               //普通模式
  61. #define  TIMER1_1              1               //8位相位可調PWM
  62. #define  TIMER1_2              2               //9位相位可調PWM
  63. #define  TIMER1_3              3               //10位相位可調PWM
  64. #define  TIMER1_4              4               //CTC模式
  65. #define  TIMER1_5              5               //8位快速PWM
  66. #define  TIMER1_6              6               //9位快速PWM
  67. #define  TIMER1_7              7               //10位快速PWM
  68. #define  TIMER1_8              8               //ICR1為TOP的相頻可調PWM
  69. #define  TIMER1_9              9               //OCR1A為TOP的相頻可調PWM
  70. #define  TIMER1_10             10              //ICR1為TOP的相位可調PWM
  71. #define  TIMER1_11             11              //OCR1A為TOP的相位可調PWM
  72. #define  TIMER1_12             12              //ICR1為匹配值的CTC模式
  73. #define  TIMER1_13             13              //保留
  74. #define  TIMER1_14             14              //ICR1為TOP值的快速PWM
  75. #define  TIMER1_15             15              //OCR1A為TOP值的快速PWM

  76. #define  TIMER2_0              0               //普通模式
  77. #define  TIMER2_1              1               //相位可調PWM
  78. #define  TIMER2_2              2               //CTC模式
  79. #define  TIMER2_3              3               //快速PWM

  80. #define  TIMER3_0              0               //普通模式
  81. #define  TIMER3_1              1               //8位相位可調PWM
  82. #define  TIMER3_2              2               //9位相位可調PWM
  83. #define  TIMER3_3              3               //10位相位可調PWM
  84. #define  TIMER3_4              4               //CTC模式
  85. #define  TIMER3_5              5               //8位快速PWM
  86. #define  TIMER3_6              6               //9位快速PWM
  87. #define  TIMER3_7              7               //10位快速PWM
  88. #define  TIMER3_8              8               //ICR3為TOP的相頻可調PWM
  89. #define  TIMER3_9              9               //OCR3A為TOP的相頻可調PWM
  90. #define  TIMER3_10             10              //ICR3為TOP的相位可調PWM
  91. #define  TIMER3_11             11              //OCR3A為TOP的相位可調PWM
  92. #define  TIMER3_12             12              //ICR3為匹配值的CTC模式
  93. #define  TIMER3_13             13              //保留
  94. #define  TIMER3_14             14              //ICR3為TOP值的快速PWM
  95. #define  TIMER3_15             15              //OCR3A為TOP值的快速PWM




  96. #endif
復制代碼








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