亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? psc_drv.h

?? 這是,單片機方面的源碼,大家下哈,這晨只是給大家做個參考
?? H
?? 第 1 頁 / 共 3 頁
字號:
//! @file psc_drv.h,v
//!
//! Copyright (c) 2004 Atmel.
//!
//! Please read file license.txt for copyright notice.
//!
//! @brief This file contains the low level macros and definition for the PSC use
//!
//! @version 1.5 at90pwm3-lib-mcu-0_0_2
//!
//! @todo
//! @bug

#ifndef PSC_DRV_H
#define PSC_DRV_H

//_____  I N C L U D E S ___________________________________________________
#include "lib_mcu/pll/pll_drv.h"

//! @defgroup PSC_modules PSC Modules
//! PSC Modules
//! @{

//_____ M A C R O S ________________________________________________________

   //! @defgroup PSC0_macros PSC0 Macros
   //! PSC0 Macros
   //! @{

      //! @defgroup PSC0_output_configuration PSC0 Output Configuration
      //! Select the PSC0 Outputs
      //! @{
#define Enable_pscout00()                             (PSOC0 |=  (1<<POEN0A) )  //!< Enable PSC0 Waveform Generator A
#define Disable_pscout00()                            (PSOC0 &= ~(1<<POEN0A) )  //!< Disable PSC0 Waveform Generator A

#define Enable_pscout01()                             (PSOC0 |=  (1<<POEN0B) )  //!< Enable PSC0 Waveform Generator B
#define Disable_pscout01()                            (PSOC0 &= ~(1<<POEN0B) )  //!< Disable PSC0 Waveform Generator B
//! Enable Both PSC0 Waveform Generator A and B
#define Enable_both_psc0_outputs()                                            \
           (PSOC0 |=  ((1<<POEN0A) | (1<<POEN0B)))
//! Disable Both PSC0 Waveform Generator A and B
#define Disable_both_psc0_outputs()                                           \
           (PSOC0 &= ~((1<<POEN0A) | (1<<POEN0B)))

#define Psc0_outputs_active_high()                    (PCNF0 |=  (1<<POP0) )    //!< PSC0 outputs are active low
#define Psc0_outputs_active_low()                     (PCNF0 &= ~(1<<POP0) )    //!< PSC0 outputs are active high
      //! @}

      //! @defgroup SPC0_mode_control_module PSC0 Mode Control
      //! PSC0C Mode ontrol
      //! @{
#define Enable_psc0_fifty_percent_mode()              (PCNF0 |=  (1<<PFIFTY0) )  //!< PSC0 is in 50% mode: Only OCR0RBH/L and OCR0SBH/L are used. They are duplicated in OCR0R/SAH/L during the update of OCR0BH/L
#define Disable_psc0_fifty_percent_mode()             (PCNF0 &= ~(1<<PFIFTY0) )  //!< OCR0R/SAH/L and OCR0R/SBH/L are fully independant

#define Enable_psc0_autolock_mode()                   (PCNF0 |=  (1<<PALOCK0) )  //!< OCR0R/SAH/L and OCR0R/SBH/L can be written without disturbing the PSC cycle. The update of these registers will be proceed at the end of the PSC cycle if the OCR0RB has been last written
#define Disable_psc0_autolock_mode()                  (PCNF0 &= ~(1<<PALOCK0) )  //!< The update will be procced according to PLOCK0 bit

#define Lock_psc0_compare_values()                    (PCNF0 |=  (1<<PLOCK0) )   //!< Take care that the lock is active only if you have disabled the autolock mode
#define Update_psc0_compare_values()                  (PCNF0 &= ~(1<<PLOCK0) )   //!< The compare registers will be updated with the content of OCR0ARH/L and OCR0BRH
      //! @}

      //! @defgroup PSC0_clock_control PSC0 Clock Control
      //! PSC0 Clock Control
      //! @{

         //! @defgroup PSC0_clock_selection PSC0 Clock Selection
         //! PSC0 Clock Selection
         //! @{
//! Connect the PSC0 input clock to the PLL
#define Psc0_use_pll_clock()                          (PCNF0 |= (1<<PCLKSEL0) )
//! Connect the PSC0 input clock to the I/O clock
#define Psc0_use_io_clock()                           (PCNF0 &= ~(1<<PCLKSEL0) )
//! Start the PLL at 64MHz and connect it to PSC0
#define Psc0_use_64_mega_pll_clock()                                          \
          (Start_pll_64_mega();                                               \
           Wait_pll_ready(),\
           Psc0_use_pll_clock() )
//! Start the PLL at 32MHz and connect it to PSC0
#define Psc0_use_32_mega_pll_clock()                                          \
          (Start_pll_32_mega(),                                               \
           Wait_pll_ready(),                                                  \
           Psc0_use_pll_clock() )
         //! @}

         //! @defgroup PSC0_prescaler_control PSC0 Prescaler Control
         //! PSC0 Prescaler Control
         //! @{
//! No PSC0prescaler
#define Disable_psc0_prescaler()                                              \
           (PCTL0 &= ~(  (1<<PPRE01) | (1<<PPRE00) ) )
//! PSC0 clock is internally divided by 4
#define Divide_psc0_input_clock_by_4()                                        \
           (PCTL0 &= ~(1<<PPRE01),                                            \
            PCTL0 |=  (1<<PPRE00) )
//! PSC0 clock is internally divided by 16
#define Divide_psc0_input_clock_by_16()                                       \
           (PCTL0 |=  (1<<PPRE01),                                            \
            PCTL0 &= ~(1<<PPRE00) )
//! PSC0 clock is internally divided by 64
#define Divide_psc0_input_clock_by_64()                                       \
           (PCTL0 |=  ((1<<PPRE01) | (1<<PPRE00)) )
         //! @}

      //! @}

      //! @defgroup PSC0_ramp_mode_selection PSC0 Ramp Mode Selection
      //! PSC0 Ramp Mode Selection
      //! @{
      //! PSC0 is configured in one ramp mode, it means that the internal counter
      //! counts from 0 up to OCR0RB
#define Psc0_in_1_ramp_mode()                                                 \
           (PCNF0 &= ~(  (1<<PMODE01) | (1<<PMODE00) ) )
//! PSC0 is configured in two ramp mode, it means that the internal counter
//! counts from 0 up to OCR0RA then from 0 to OCR0RB
#define Psc0_in_2_ramps_mode()                                                \
           (PCNF0 &= ~(1<<PMODE01),                                           \
            PCNF0 |=  (1<<PMODE00) )
//! PSC0 is configured in for ramp mode, it means that the internal counter
//! counts from 0 up to OCR0SA then from 0 to OCR0RA then from 0 to OCR0SB then from 0 to OCR0RB
#define Psc0_in_4_ramps_mode()                                                \
           (PCNF0 |=  (1<<PMODE01),                                           \
            PCNF0 &= ~(1<<PMODE00) )
//! PSC0 is configured in for ramp mode, it means that the internal counter
//! counts from 0 up to OCR0RB then from OCR0RB downto 0
#define Psc0_in_centered_aligned_mode()                                       \
           (PCNF0 |=  (  (1<<PMODE01) | (1<<PMODE00) ) )
      //! @}

      //! @defgroup PSC0_flank_width_modulation_configuration PSC0 Flank Width Modulation Configuration
      //! Select PSC0 Flank Width Modulation Configuration
      //! @{
#define Psc0_symetrical_flank_width_modulation()      (PCTL0 |=  (1<<PBFM0) )     //!< PSC0 Flank width modulation operates on both OCR0RA and OCR0RB
#define Psc0_end_of_cycle_flank_width_modulation()    (PCTL0 &= ~(1<<PBFM0) )     //!< PSC0 Flank width modulation operates only on OCR0RB
      //! @}

      //! @defgroup PSC0_adc_amplifier_trigger_configuration PSC0 ADC Amplifier Trigger Configuration
      //! Select the PSC0 trigger configuration for the ADC or the amplifier
      //! @{
//! The PSC0 synchronization signal is sent to the ADC/Amplifier on waveform generator A leading edge
#define Psc0_synchro_on_waveform_generator_a_leading_edge()                   \
           (PSCO0 &= ~(  (1<<PSYNC01) | (1<<PSYNC00) ) )
//! The PSC0 synchronization signal is sent to the ADC/Amplifier on waveform generator A trailing edge
#define Psc0_synchro_on_waveform_generator_a_trailing_edge()                  \
           (PSCO0 &= ~(1<<PSYNC01),                                           \
            PSCO0 |=  (1<<PSYNC00) )
//! The PSC0 synchronization signal is sent to the ADC/Amplifier on waveform generator B leading edge
#define Psc0_synchro_on_waveform_generator_b_leading_edge()                   \
           (PSCO0 |=  (1<<PSYNC01),                                           \
            PSCO0 &= ~(1<<PSYNC00) )
//! The PSC0 synchronization signal is sent to the ADC/Amplifier on waveform generator B trailing edge
#define Psc0_synchro_on_waveform_generator_b_trailing_edge()                  \
           (PSCO0 |=  (  (1<<PSYNC01) | (1<<PSYNC00) ) )
      //! @}

      //! @defgroup PSC0_run_control PSC0 Run Control
      //! Turn On and Off the PSC0
      //! @{
#define Start_psc0()                                  (PCTL0 |=  (1<<PRUN0) )     //!< Turn On PSC0
#define Stop_psc0()                                   (PCTL0 &= ~(1<<PRUN0) )     //!< Turn Off PSC0
//! Turn Off PSC0 and the end of cycle
#define Psc0_complete_waveform_and_stop()             (PCTL0 |=  (1<<PCCYC0), \
                                                       PCTL0 &= ~(1<<PRUN0) )
#define Is_psc0_started()                             (PCTL0 & (1<<PRUN0) )
      //! @}

      //! @defgroup PSC0_fault_mode_configuration PSC0 Fault Mode Configuration
      //! PSC0 Fault Mode Configuration
      //! @{
#define Enable_pscout00_fault_mode()                  (PCTL0 |=  (1<<PAOC0A) )    //!< Fault input select to block A can act directly to PSCOUT00 output
#define Disable_pscout00_fault_mode()                 (PCTL0 &= ~(1<<PAOC0A) )    //!< No fault or retrigger management on PSCOUT00

#define Enable_pscout01_fault_mode()                  (PCTL0 |=  (1<<PAOC0B) )    //!< Fault input select to block A can act directly to PSCOUT00 output
#define Disable_pscout01_fault_mode()                 (PCTL0 &= ~(1<<PAOC0B) )    //!< No fault or retrigger management on PSCOUT01

#define Enable_psc0_autorun()                         (PCTL0 |=  (1<<PARUN0) )    //!< Setting PRUN2 in PCTL2 register or setting both PARUN2 in PCTL2 register and PRUN1 in PCTL1 register will make the two PSC start simultaneously
#define Disable_psc0_autorun()                        (PCTL0 &= ~(1<<PARUN0) )    //!< No synchronization between PSC2 and PSC0 exists
      //! @}

      //! @defgroup PSC0_interrupt_configuration PSC0 Interrupt Configuration
      //! PSC0 interrupt configuration
      //! @{
#define Enable_psc0_synchro_error_interrupt()         (PIM0 |=  (1<<PSEIE0) )     //!< An interrupt is generated when the PSEI0 bit is set
#define Disable_psc0_synchro_error_interrupt()        (PIM0 &= ~(1<<PSEIE0) )     //!< No interrupt is generated when the PSEI0 bit is set

#define Enable_psc0_external_event_a_interrupt()      (PIM0 |=  (1<<PEVE0A) )     //!< An external event which can generate a capture from retrigger/fault block A generates an interrupt
#define Disable_psc0_external_event_a_interrupt()     (PIM0 &= ~(1<<PEVE0A) )     //!< An external event which can generate a capture from retrigger/fault block A doesn't generate any interrupt

#define Enable_psc0_external_event_b_interrupt()      (PIM0 |=  (1<<PEVE0B) )     //!< An external event which can generate a capture from retrigger/fault block B generates an interrupt
#define Disable_psc0_external_event_b_interrupt()     (PIM0 &= ~(1<<PEVE0B) )     //!< An external event which can generate a capture from retrigger/fault block B doesn't generate any interrupt

#define Enable_psc0_end_of_cycle_interrupt()          (PIM0 |=  (1<<PEOPE0) )     //!< An interrupt is generated when PSC0 reaches the end of the whole cycle
#define Disable_psc0_end_of_cycle_interrupt()         (PIM0 &= ~(1<<PEOPE0) )     //!< No interrupt is generated when PSC0 reaches the end of the whole cycle
      //! @}

      //! @defgroup PSC0_interrupt_flag_control PSC0 Interrupt Flag Control
      //! PSC0 interrupt flag control
      //! @{
#define Is_psc0_synchro_error_interrupt_flag_set()    (PIFR0 & (1<<PSEI0) )       //!< Return 1 if the PSEI0 bit in PIFR0 is set
#define Clear_psc0_synchro_error_interrupt_flag()     (PIFR0 &= ~(1<<PSEI0) )     //!< Clear PSEI0 bit in PIFR0 register

#define Is_psc0_external_event_a_interrupt_flag_set() (PIFR0 & (1<<PEV0A) )       //!< Return 1 if the PEV0A bit in PIFR0 is set
#define Clear_psc0_external_event_a_interrupt_flag()  (PIFR0 &= ~(1<<PEV0A) )     //!< Clear PEV0A bit in PIFR0 register

#define Is_psc0_external_event_b_interrupt_flag_set() (PIFR0 & (1<<PEV0B) )       //!< Return 1 if the PEV0B bit in PIFR0 is set
#define Clear_psc0_external_event_b_interrupt_flag()  (PIFR0 &= ~(1<<PEV0B) )     //!< Clear PEV0B bit in PIFR0 register

#define Is_psc0_end_of_cycle_interrupt_flag_set()     (PIFR0 & (1<<PEOP2) )       //!< Return 1 if the PE0P2 bit in PIFR0 is set
#define Clear_psc0_end_of_cycle_interrupt_flag()           (PIFR0 &= ~(1<<PEOP2) )     //!< Clear PEOP2 bit in PIFR0 register
      //! @}

      //! @defgroup PSC0_comparison_value_initilization PSC0 Comparison Value Initialization
      //! This section allows to fully initilaize the comprison values
      //! @{
//! Init all PSC0 comparison values
#define Init_psc0_all_compare_values(PSC0_DEADTIME0, PSC0_ONTIME0, PSC0_DEADTIME1, PSC0_ONTIME1)  \
           (OCR0SAH = HIGH((U16)PSC0_DEADTIME0),                              \
            OCR0SAL = LOW ((U16)PSC0_DEADTIME0),                              \
            OCR0RAH = HIGH((U16)PSC0_ONTIME0),                                \
            OCR0RAL = LOW ((U16)PSC0_ONTIME0),                                \
            OCR0SBH = HIGH((U16)PSC0_DEADTIME1),                              \
            OCR0SBL = LOW ((U16)PSC0_DEADTIME1),                              \
            OCR0RBH = HIGH((U16)PSC0_ONTIME1),                                \
            OCR0RBL = LOW ((U16)PSC0_ONTIME1)   )
//! Init PSC0 fifty percent comparison values (usefull for 50% mode)
#define Init_psc0_fifty_percent_compare_values(PSC0_DEADTIME1, PSC0_ONTIME1)              \
           (OCR0SBH = HIGH((U16)PSC0_DEADTIME1),                              \
            OCR0SBL = LOW ((U16)PSC0_DEADTIME1),                              \
            OCR0RBH = HIGH((U16)PSC0_ONTIME1),                                \
            OCR0RBL = LOW ((U16)PSC0_ONTIME1)   )
      //! @}

   //! @}


   //! @defgroup PSC1_macros PSC1 Macros
   //! PSC1 Macros
   //! @{

      //! @defgroup PSC1_output_configuration PSC1 Output Configuration
      //! Select the PSC1 Outputs
      //! @{
#define Enable_pscout10()                             (PSOC1 |=  (1<<POEN1A) )  //!< Enable PSC1 Waveform Generator A

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩v精品一区二区| 黄一区二区三区| 色婷婷av久久久久久久| 成人欧美一区二区三区白人| 99在线热播精品免费| 最新中文字幕一区二区三区| 91久久免费观看| 日韩黄色在线观看| 久久免费视频色| av不卡免费在线观看| 亚洲最大色网站| 国产女同互慰高潮91漫画| 成人免费av在线| 亚洲一区二区三区四区不卡| 91精品国产美女浴室洗澡无遮挡| 老司机免费视频一区二区| 亚洲国产精品激情在线观看| 一本到三区不卡视频| 美脚の诱脚舐め脚责91 | 免费成人结看片| 久久久精品国产99久久精品芒果| av日韩在线网站| 午夜成人免费电影| 欧美精彩视频一区二区三区| 色丁香久综合在线久综合在线观看| 视频在线观看一区二区三区| 久久精品人人做| 日本高清不卡一区| 韩国av一区二区三区在线观看| 国产精品久久久久久妇女6080| 欧美精品久久99久久在免费线 | 国产精品国模大尺度视频| 欧美剧情片在线观看| 国产成a人亚洲精品| 亚洲成av人片在线观看| 国产日韩成人精品| 日韩一区二区电影| 一本色道久久综合亚洲精品按摩 | 国产精品夜夜爽| 亚洲在线视频一区| 国产免费久久精品| 3atv在线一区二区三区| 99久久精品费精品国产一区二区| 久久激五月天综合精品| 一片黄亚洲嫩模| 国产亚洲视频系列| 欧美一级搡bbbb搡bbbb| 日本高清无吗v一区| 国产精品一区二区黑丝| 免费观看91视频大全| 亚洲精品乱码久久久久| 国产女同性恋一区二区| 精品国产凹凸成av人导航| 欧美日韩在线三级| 91老师片黄在线观看| 国产精品综合一区二区三区| 婷婷一区二区三区| 亚洲成人激情综合网| 亚洲丝袜精品丝袜在线| 国产日韩av一区二区| 久久嫩草精品久久久久| 精品国产乱子伦一区| 911精品产国品一二三产区| 在线观看日韩高清av| 欧美日本视频在线| 欧美亚洲国产一卡| 色诱视频网站一区| 色婷婷激情综合| 色婷婷综合久久| www.66久久| 99久久er热在这里只有精品15| 国产精品小仙女| 高清久久久久久| 国产91色综合久久免费分享| 国产精品亚洲视频| 国产a久久麻豆| 国产福利一区二区三区视频| 国产一区高清在线| 国产精品资源站在线| 国产精品12区| 99久久精品免费看国产免费软件| 成人免费视频app| 99在线精品观看| 色综合色狠狠天天综合色| 欧美亚洲一区二区三区四区| 在线观看区一区二| 欧美日韩一级大片网址| 日韩一区二区三区在线观看| 日韩欧美在线123| 欧美精品一区男女天堂| 久久久国产精品午夜一区ai换脸| 国产网红主播福利一区二区| 中文字幕精品—区二区四季| 国产精品萝li| 亚洲综合在线免费观看| 石原莉奈在线亚洲三区| 精品一区二区三区蜜桃| 精品亚洲国内自在自线福利| 丁香激情综合国产| 91激情五月电影| 欧美一级一级性生活免费录像| 欧美精品一区二区三区在线| 国产日韩v精品一区二区| 一区二区三区在线不卡| 视频一区二区不卡| 国产成人aaaa| 欧美日韩视频在线一区二区| 精品三级av在线| 日韩理论电影院| 蜜臀精品一区二区三区在线观看 | 久久综合久久综合久久综合| 国产亚洲精品bt天堂精选| 亚洲精品成人悠悠色影视| 日韩高清中文字幕一区| 国产v综合v亚洲欧| 日本韩国欧美一区二区三区| 日韩欧美一区二区视频| 136国产福利精品导航| 日韩激情av在线| 成人动漫视频在线| 日韩欧美aaaaaa| 亚洲免费在线电影| 极品美女销魂一区二区三区 | 久久99国产精品久久99| 菠萝蜜视频在线观看一区| 欧美精品在线一区二区三区| 国产欧美久久久精品影院| 日韩高清不卡一区二区三区| 成人黄色777网| 精品88久久久久88久久久| 亚洲成在人线在线播放| 成人一级片网址| 欧美tk—视频vk| 亚洲一线二线三线视频| 成人午夜在线播放| 欧美一级黄色片| 亚洲国产欧美一区二区三区丁香婷| eeuss国产一区二区三区| 日韩色在线观看| 一区二区三区在线影院| 成人网页在线观看| 日韩欧美国产电影| 水蜜桃久久夜色精品一区的特点 | 亚洲综合丁香婷婷六月香| 国产美女久久久久| 日韩欧美综合在线| 五月婷婷激情综合| 日本韩国欧美国产| 亚洲日本va午夜在线影院| 国产成人免费9x9x人网站视频| 欧美一级精品在线| 日韩不卡一区二区三区| 欧美老女人第四色| 亚洲国产精品一区二区久久恐怖片| 成人免费高清在线观看| 国产欧美精品在线观看| 国产精品白丝jk黑袜喷水| 26uuu国产在线精品一区二区| 日精品一区二区| 337p亚洲精品色噜噜狠狠| 亚洲图片欧美视频| 欧美在线免费播放| 亚洲在线一区二区三区| 欧美体内she精视频| 亚洲图片欧美激情| 色爱区综合激月婷婷| 亚洲精品网站在线观看| 色综合久久综合| 一区二区免费在线| 精品视频在线免费| 日韩高清不卡一区二区| 欧美成人video| 国产在线精品一区二区三区不卡| 久久亚洲捆绑美女| 福利一区二区在线| 国产精品欧美久久久久一区二区| 成人激情小说乱人伦| 亚洲免费电影在线| 欧美三级一区二区| 免费看黄色91| 欧美国产日韩a欧美在线观看| 成人免费毛片app| 一区二区三区欧美在线观看| 欧美日韩国产bt| 另类的小说在线视频另类成人小视频在线| 欧美一区二区不卡视频| 韩国欧美一区二区| 国产精品不卡在线| 欧美三区在线视频| 久久电影网站中文字幕| 国产精品美女www爽爽爽| 91麻豆成人久久精品二区三区| 亚洲尤物视频在线| 国产欧美日韩三级| 在线免费亚洲电影| 蓝色福利精品导航| ●精品国产综合乱码久久久久 | 色综合色综合色综合色综合色综合 | 亚洲综合自拍偷拍| 精品久久国产97色综合|