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

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

?? psc_drv.h

?? 這是,單片機(jī)方面的源碼,大家下哈,這晨只是給大家做個(gè)參考
?? 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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91国偷自产一区二区三区观看| 欧美一区二区女人| 偷拍自拍另类欧美| 国产亚洲精品久| 在线播放欧美女士性生活| 成人晚上爱看视频| 性感美女久久精品| 中文字幕精品—区二区四季| 日韩三级视频在线看| 日本道色综合久久| 国产精品1区2区3区在线观看| 性久久久久久久久久久久| 国产精品国产自产拍在线| 日韩视频国产视频| 欧美日韩你懂得| 91在线porny国产在线看| 国产精品一区二区视频| 日本伊人色综合网| 亚洲激情网站免费观看| 欧美极品少妇xxxxⅹ高跟鞋| 欧美不卡一区二区三区| 欧美日韩国产色站一区二区三区| 成人福利视频在线| 国产一区二区三区精品欧美日韩一区二区三区 | 精品久久久久久无| 欧美日韩一区国产| 9i看片成人免费高清| 国产成人av一区| 老司机免费视频一区二区 | 欧美96一区二区免费视频| 亚洲精品视频在线看| 国产精品三级av| 久久久三级国产网站| 欧美一区二区久久久| 欧美三级视频在线观看 | 欧美日韩日本视频| 欧美在线观看18| 91免费看视频| 99精品久久99久久久久| 成人午夜看片网址| 成人免费三级在线| 丁香婷婷综合五月| 成人性生交大合| 成人一二三区视频| 99re66热这里只有精品3直播| www.日韩精品| 99视频一区二区| 色婷婷av一区| 欧美日韩一区二区三区免费看| 欧美性视频一区二区三区| 欧美在线色视频| 欧美精品v国产精品v日韩精品| 91精品婷婷国产综合久久性色| 欧美日韩免费电影| 在线观看91av| 久久亚洲一区二区三区明星换脸| 亚洲精品一区二区精华| 久久精品视频一区二区三区| 中文字幕av一区 二区| 1区2区3区国产精品| 亚洲女同女同女同女同女同69| 曰韩精品一区二区| 婷婷久久综合九色综合绿巨人| 蜜桃精品视频在线| 国产盗摄精品一区二区三区在线| 成人午夜激情视频| 欧美亚洲免费在线一区| 日韩欧美资源站| 国产日韩精品视频一区| 亚洲欧洲美洲综合色网| 亚洲aaa精品| 国产资源精品在线观看| 99亚偷拍自图区亚洲| 欧美日本韩国一区二区三区视频| 日韩一区二区免费电影| 中文字幕av资源一区| 一区二区三区在线看| 日韩高清不卡在线| 国产成人午夜视频| 欧美最猛性xxxxx直播| 欧美一区二区日韩一区二区| 国产精品人成在线观看免费| 亚洲最大成人综合| 美女mm1313爽爽久久久蜜臀| 99久久er热在这里只有精品15| 欧美色涩在线第一页| 久久综合色鬼综合色| 一区二区高清视频在线观看| 国产一区二区三区在线看麻豆| 色综合久久中文字幕| 欧美成人性福生活免费看| 日韩毛片精品高清免费| 免费观看成人av| 91麻豆免费观看| 欧美成人女星排名| 亚洲一区视频在线| 国产成人精品1024| 欧美一区二区在线看| 日韩一区在线播放| 国产伦精品一区二区三区视频青涩| 一本大道av伊人久久综合| 亚洲精品在线观看网站| 亚洲一区二区三区影院| 丰满少妇久久久久久久| 欧美另类一区二区三区| 国产精品第五页| 国内精品久久久久影院色| 欧美久久久久久久久| 国产精品久久久久精k8| 国产美女一区二区三区| 欧美日韩午夜在线| 日韩一区在线播放| 国产aⅴ精品一区二区三区色成熟| 欧美日韩国产免费一区二区| 亚洲欧美一区二区三区久本道91| 国内精品国产三级国产a久久| 51精品久久久久久久蜜臀| 亚洲免费色视频| 懂色av一区二区三区免费看| 日韩三级在线免费观看| 日韩在线播放一区二区| 欧美视频在线一区二区三区| 成人欧美一区二区三区视频网页| 国内精品国产三级国产a久久| 91精品国产色综合久久不卡电影| 亚洲国产成人精品视频| 一本久道久久综合中文字幕| 国产精品免费aⅴ片在线观看| 国产乱子伦一区二区三区国色天香| 欧美一级专区免费大片| 男男gaygay亚洲| 日韩一区二区三| 久久99久久久久| 精品国产一区二区三区久久影院 | 麻豆精品一区二区av白丝在线| 欧美色视频在线| 亚洲国产精品一区二区久久恐怖片 | 亚洲成人中文在线| 欧美亚洲国产bt| 亚洲成人自拍偷拍| 欧美精品一级二级三级| 视频一区二区三区中文字幕| 欧美肥大bbwbbw高潮| 石原莉奈一区二区三区在线观看 | 欧美美女直播网站| 天天做天天摸天天爽国产一区| 欧美日韩视频不卡| 视频一区视频二区中文字幕| 欧美一区二区三区四区高清| 免费高清在线视频一区·| 精品国产免费久久| 国产成人在线视频免费播放| 中文字幕欧美三区| 色欧美片视频在线观看| 亚洲线精品一区二区三区| 欧美三级日韩三级| 日本在线播放一区二区三区| 精品少妇一区二区三区在线视频| 国产成人综合在线观看| 17c精品麻豆一区二区免费| 欧洲av在线精品| 美女性感视频久久| 国产校园另类小说区| 91污在线观看| 日韩—二三区免费观看av| 精品国产乱码久久久久久影片| 成人的网站免费观看| 一区二区三区在线观看视频| 51午夜精品国产| 成人免费视频视频| 亚洲综合免费观看高清完整版 | 精一区二区三区| 国产精品丝袜一区| 欧美日韩一区二区在线视频| 免费高清在线视频一区·| 亚洲国产精品精华液2区45| 91国内精品野花午夜精品| 久久精品99国产精品| 中文字幕一区av| 欧美一卡在线观看| 不卡av在线免费观看| 日韩高清一区二区| 中文字幕一区二区三中文字幕| 欧美巨大另类极品videosbest | 国产在线观看一区二区| 亚洲人成在线播放网站岛国| 91精品国产综合久久久久久久久久| 国产精品一区二区在线播放| 亚洲一区在线视频观看| 国产亚洲视频系列| 在线91免费看| jizz一区二区| 麻豆成人91精品二区三区| 亚洲婷婷在线视频| 久久综合久久综合亚洲| 欧美性生活久久| 成人免费看片app下载| 毛片基地黄久久久久久天堂| 亚洲美女视频在线观看| 欧美激情综合在线|