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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? adc.c

?? freertosV4.40 是一種small的嵌入式系統。利于嵌入式開好者入門學習嵌入式操作系統。通過對于源碼的學習可以很好的掌握freertos的運行機制。
?? C
?? 第 1 頁 / 共 3 頁
字號:
          (ulCount < 8))
    {
        //
        // Read the FIFO and copy it to the destination.
        //
        *pulBuffer++ = HWREG(ulBase + ADC_O_X_SSFIFO);

        //
        // Increment the count of samples read.
        //
        ulCount++;
    }

    //
    // Return the number of samples read.
    //
    return(ulCount);
}
#endif

//*****************************************************************************
//
//! Causes a processor trigger for a sample sequence.
//!
//! \param ulBase is the base address of the ADC module.
//! \param ulSequenceNum is the sample sequence number.
//!
//! This function triggers a processor-initiated sample sequence if the sample
//! sequence trigger is configured to ADC_TRIGGER_PROCESSOR.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_processortrigger) || defined(BUILD_ALL) || defined(DOXYGEN)
void
ADCProcessorTrigger(unsigned long ulBase, unsigned long ulSequenceNum)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == ADC_BASE);
    ASSERT(ulSequenceNum < 4);

    //
    // Generate a processor trigger for this sample sequence.
    //
    HWREG(ulBase + ADC_O_PSSI) = 1 << ulSequenceNum;
}
#endif

//*****************************************************************************
//
//! Configures the software oversampling factor of the ADC.
//!
//! \param ulBase is the base address of the ADC module.
//! \param ulSequenceNum is the sample sequence number.
//! \param ulFactor is the number of samples to be averaged.
//!
//! This function configures the software oversampling for the ADC, which can
//! be used to provide better resolution on the sampled data.  Oversampling is
//! accomplished by averaging multiple samples from the same analog input.
//! Three different oversampling rates are supported; 2x, 4x, and 8x.
//!
//! Oversampling is only supported on the sample sequencers that are more than
//! one sample in depth (i.e. the fourth sample sequencer is not supported).
//! Oversampling by 2x (for example) divides the depth of the sample sequencer
//! by two; so 2x oversampling on the first sample sequencer can only provide
//! four samples per trigger.  This also means that 8x oversampling is only
//! available on the first sample sequencer.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_softwareoversampleconfigure) || defined(BUILD_ALL) || \
    defined(DOXYGEN)
void
ADCSoftwareOversampleConfigure(unsigned long ulBase,
                               unsigned long ulSequenceNum,
                               unsigned long ulFactor)
{
    unsigned long ulValue;

    //
    // Check the arguments.
    //
    ASSERT(ulBase == ADC_BASE);
    ASSERT(ulSequenceNum < 3);
    ASSERT(((ulFactor == 2) || (ulFactor == 4) || (ulFactor == 8)) &&
           ((ulSequenceNum == 0) || (ulFactor != 8)));

    //
    // Convert the oversampling factor to a shift factor.
    //
    for(ulValue = 0, ulFactor >>= 1; ulFactor; ulValue++, ulFactor >>= 1)
    {
    }

    //
    // Save the sfiht factor.
    //
    g_pucOversampleFactor[ulSequenceNum] = ulValue;
}
#endif

//*****************************************************************************
//
//! Configures a step of the software oversampled sequencer.
//!
//! \param ulBase is the base address of the ADC module.
//! \param ulSequenceNum is the sample sequence number.
//! \param ulStep is the step to be configured.
//! \param ulConfig is the configuration of this step.
//!
//! This function configures a step of the sample sequencer when using the
//! software oversampling feature.  The number of steps available depends on
//! the oversampling factor set by ADCSoftwareOversampleConfigure().  The value
//! of \e ulConfig is the same as defined for ADCSequenceStepConfigure().
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_softwareoversamplestepconfigure) || defined(BUILD_ALL) || \
    defined(DOXYGEN)
void
ADCSoftwareOversampleStepConfigure(unsigned long ulBase,
                                   unsigned long ulSequenceNum,
                                   unsigned long ulStep,
                                   unsigned long ulConfig)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == ADC_BASE);
    ASSERT(ulSequenceNum < 3);
    ASSERT(((ulSequenceNum == 0) &&
            (ulStep < (8 >> g_pucOversampleFactor[ulSequenceNum]))) ||
           (ulStep < (4 >> g_pucOversampleFactor[ulSequenceNum])));

    //
    // Get the offset of the sequence to be configured.
    //
    ulBase += ADC_O_SEQ + (ADC_O_SEQ_STEP * ulSequenceNum);

    //
    // Compute the shift for the bits that control this step.
    //
    ulStep *= 4 << g_pucOversampleFactor[ulSequenceNum];

    //
    // Loop through the hardware steps that make up this step of the software
    // oversampled sequence.
    //
    for(ulSequenceNum = 1 << g_pucOversampleFactor[ulSequenceNum];
        ulSequenceNum; ulSequenceNum--)
    {
        //
        // Set the analog mux value for this step.
        //
        HWREG(ulBase + ADC_O_X_SSMUX) = ((HWREG(ulBase + ADC_O_X_SSMUX) &
                                          ~(0x0000000f << ulStep)) |
                                         ((ulConfig & 0x0f) << ulStep));

        //
        // Set the control value for this step.
        //
        HWREG(ulBase + ADC_O_X_SSCTL) = ((HWREG(ulBase + ADC_O_X_SSCTL) &
                                          ~(0x0000000f << ulStep)) |
                                         (((ulConfig & 0xf0) >> 4) << ulStep));
        if(ulSequenceNum != 1)
        {
            HWREG(ulBase + ADC_O_X_SSCTL) &= ~((ADC_SSCTL_IE0 |
                                                ADC_SSCTL_END0) << ulStep);
        }

        //
        // Go to the next hardware step.
        //
        ulStep += 4;
    }
}
#endif

//*****************************************************************************
//
//! Gets the captured data for a sample sequence using software oversampling.
//!
//! \param ulBase is the base address of the ADC module.
//! \param ulSequenceNum is the sample sequence number.
//! \param pulBuffer is the address where the data is stored.
//! \param ulCount is the number of samples to be read.
//!
//! This function copies data from the specified sample sequence output FIFO to
//! a memory resident buffer with software oversampling applied.  The requested
//! number of samples are copied into the data buffer; if there are not enough
//! samples in the hardware FIFO to satisfy this many oversampled data items
//! then incorrect results will be returned.  It is the caller's responsibility
//! to read only the samples that are available and wait until enough data is
//! available, for example as a result of receiving an interrupt.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_softwareoversampledataget) || defined(BUILD_ALL) || \
    defined(DOXYGEN)
void
ADCSoftwareOversampleDataGet(unsigned long ulBase, unsigned long ulSequenceNum,
                             unsigned long *pulBuffer, unsigned long ulCount)
{
    unsigned long ulIdx, ulAccum;

    //
    // Check the arguments.
    //
    ASSERT(ulBase == ADC_BASE);
    ASSERT(ulSequenceNum < 3);
    ASSERT(((ulSequenceNum == 0) &&
            (ulCount < (8 >> g_pucOversampleFactor[ulSequenceNum]))) ||
           (ulCount < (4 >> g_pucOversampleFactor[ulSequenceNum])));

    //
    // Get the offset of the sequence to be read.
    //
    ulBase += ADC_O_SEQ + (ADC_O_SEQ_STEP * ulSequenceNum);

    //
    // Read the samples from the FIFO until it is empty.
    //
    while(ulCount--)
    {
        //
        // Compute the sum of the samples.
        //
        ulAccum = 0;
        for(ulIdx = 1 << g_pucOversampleFactor[ulSequenceNum]; ulIdx; ulIdx--)
        {
            //
            // Read the FIFO and add it to the accumulator.
            //
            ulAccum += HWREG(ulBase + ADC_O_X_SSFIFO);
        }

        //
        // Write the averaged sample to the output buffer.
        //
        *pulBuffer++ = ulAccum >> g_pucOversampleFactor[ulSequenceNum];
    }
}
#endif

//*****************************************************************************
//
//! Configures the hardware oversampling factor of the ADC.
//!
//! \param ulBase is the base address of the ADC module.
//! \param ulFactor is the number of samples to be averaged.
//!
//! This function configures the hardware oversampling for the ADC, which can
//! be used to provide better resolution on the sampled data.  Oversampling is
//! accomplished by averaging multiple samples from the same analog input.  Six
//! different oversampling rates are supported; 2x, 4x, 8x, 16x, 32x, and 64x.
//! Specifying an oversampling factor of zero will disable the hardware
//! oversampler.
//!
//! Hardware oversampling applies uniformly to all sample sequencers.  It does
//! not reduce the depth of the sample sequencers like the software
//! oversampling APIs; each sample written into the sample sequence FIFO is a
//! fully oversampled analog input reading.
//!
//! Enabling hardware averaging increases the precision of the ADC at the cost
//! of throughput.  For example, enabling 4x oversampling reduces the
//! throughput of a 250 KSps ADC to 62.5 KSps.
//!
//! \note Hardware oversampling is available beginning with Rev C0 of the
//! Stellaris microcontroller.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_hardwareoversampleconfigure) || defined(BUILD_ALL) || \
    defined(DOXYGEN)
void
ADCHardwareOversampleConfigure(unsigned long ulBase,
                               unsigned long ulFactor)
{
    unsigned long ulValue;

    //
    // Check the arguments.
    //
    ASSERT(ulBase == ADC_BASE);
    ASSERT(((ulFactor == 0) || (ulFactor == 2) || (ulFactor == 4) ||
           (ulFactor == 8) || (ulFactor == 16) || (ulFactor == 32) ||
           (ulFactor == 64)));

    //
    // Convert the oversampling factor to a shift factor.
    //
    for(ulValue = 0, ulFactor >>= 1; ulFactor; ulValue++, ulFactor >>= 1)
    {
    }

    //
    // Write the shift factor to the ADC to configure the hardware oversampler.
    //
    HWREG(ulBase + ADC_O_SAC) = ulValue;
}
#endif

//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产美女主播视频一区| 亚洲卡通欧美制服中文| 蜜桃视频一区二区三区| 欧美一区二区三区人| 日本亚洲天堂网| 日韩欧美一区二区在线视频| 久久狠狠亚洲综合| 国产三级久久久| gogogo免费视频观看亚洲一| 日韩一区有码在线| 在线观看日韩电影| 日韩 欧美一区二区三区| 精品国产91乱码一区二区三区| 国模套图日韩精品一区二区| 国产网站一区二区三区| 99这里只有精品| 亚洲成av人片观看| 精品国产电影一区二区| 成人黄色在线看| 亚洲午夜影视影院在线观看| 欧美v日韩v国产v| 成人做爰69片免费看网站| 亚洲欧美一区二区三区极速播放 | 亚洲乱码国产乱码精品精的特点 | 不卡免费追剧大全电视剧网站| 国产精品萝li| 制服丝袜成人动漫| 国产.欧美.日韩| 亚洲成人av电影在线| 2023国产一二三区日本精品2022| 99国产精品国产精品毛片| 天天色图综合网| 欧美国产日韩一二三区| 欧美日韩精品三区| 国产高清不卡二三区| 亚洲福利视频三区| 国产亚洲精品aa午夜观看| 欧美在线不卡视频| 国产suv精品一区二区三区 | 视频一区二区不卡| 国产偷国产偷亚洲高清人白洁| 欧美午夜精品一区二区蜜桃| 国产乱子伦视频一区二区三区 | 午夜一区二区三区视频| 国产亚洲va综合人人澡精品| 在线不卡的av| 一本久久精品一区二区| 国产成人免费视频网站高清观看视频| 亚洲综合精品自拍| 国产精品久线观看视频| 日韩精品一区二区三区四区| 日本道在线观看一区二区| 丁香六月综合激情| 美女视频免费一区| 性做久久久久久免费观看| 国产精品久久久99| 国产亚洲精品bt天堂精选| 日韩一级视频免费观看在线| 欧美三级电影一区| 91在线视频播放地址| 国产69精品久久久久777| 蜜臀久久久99精品久久久久久| 亚洲一区二区在线视频| 亚洲视频精选在线| 国产精品日韩成人| 久久久美女艺术照精彩视频福利播放| 欧美日韩在线观看一区二区 | 欧美亚洲国产一区二区三区va| 成人免费看片app下载| 国产一区在线观看视频| 日韩精彩视频在线观看| 亚洲国产人成综合网站| 亚洲私人影院在线观看| 亚洲欧美在线观看| 综合自拍亚洲综合图不卡区| 最新久久zyz资源站| 中文字幕免费观看一区| 中文字幕免费观看一区| 国产精品无圣光一区二区| 欧美国产一区二区在线观看| 国产丝袜美腿一区二区三区| 久久久午夜精品| 国产视频在线观看一区二区三区| 国产欧美一区二区三区鸳鸯浴 | 欧美一级二级在线观看| 欧美一区二区三级| 日韩一区二区麻豆国产| 精品国产伦一区二区三区观看体验 | 亚洲中国最大av网站| 一级日本不卡的影视| 亚洲一二三专区| 视频一区在线播放| 麻豆精品一区二区| 九九国产精品视频| 国产成人精品免费一区二区| 成人av电影免费观看| 91视频com| 欧美日韩一区精品| 日韩欧美电影一二三| 久久精品人人做人人综合| 亚洲日本一区二区| 婷婷开心久久网| 国产麻豆精品在线| 色综合久久六月婷婷中文字幕| 欧美日韩美少妇| 精品久久久久久久人人人人传媒 | 99久久免费国产| 欧美自拍偷拍午夜视频| 欧美一区二区三区人| 国产日韩在线不卡| 亚洲综合色自拍一区| 精品一区二区三区视频在线观看| 国产成+人+日韩+欧美+亚洲| 欧美日韩一区三区| 国产日韩三级在线| 午夜不卡av在线| 国产精品一卡二| 欧美大白屁股肥臀xxxxxx| 精品久久久久久久人人人人传媒 | 欧美日韩免费高清一区色橹橹| 91精品欧美一区二区三区综合在| 欧美成va人片在线观看| 国产午夜精品久久久久久免费视 | 国产精品第一页第二页第三页| 亚洲国产乱码最新视频| 国产精一品亚洲二区在线视频| 在线亚洲一区二区| 亚洲婷婷国产精品电影人久久| 亚洲成人av福利| 成人一区二区视频| 欧美久久久久久久久中文字幕| 国产精品国产自产拍高清av王其| 亚洲成人手机在线| 9久草视频在线视频精品| 日韩一级黄色大片| 亚洲综合激情另类小说区| 国产麻豆日韩欧美久久| 337p亚洲精品色噜噜| 国产精品国产三级国产aⅴ无密码| 久久综合综合久久综合| 91豆麻精品91久久久久久| 国产视频一区在线观看| 奇米一区二区三区| 在线观看91精品国产入口| 日本一区二区三区国色天香| 美女国产一区二区三区| 欧美性色欧美a在线播放| 中文字幕综合网| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 中文字幕在线一区| 国产精品一区在线| 精品日产卡一卡二卡麻豆| 亚洲一区二区高清| 成人app下载| 国产欧美精品国产国产专区| 久久91精品久久久久久秒播| 91麻豆精品国产91久久久| 亚洲综合一区二区精品导航| 91性感美女视频| 国产精品久久久久久一区二区三区| 九九在线精品视频| 欧美成人在线直播| 免费观看一级特黄欧美大片| 91麻豆精品国产91久久久更新时间| 亚洲午夜激情网页| 欧美影院午夜播放| 亚洲高清久久久| 欧美日韩成人在线一区| 午夜精品久久久久| 欧美精品欧美精品系列| 日韩不卡一区二区| 91麻豆精品久久久久蜜臀 | 久久精品人人做人人爽人人| 国产乱码精品一品二品| 久久午夜电影网| 国产美女视频91| 欧美高清在线一区二区| 成人精品高清在线| 亚洲美女屁股眼交| 91国产精品成人| 婷婷一区二区三区| 精品区一区二区| 国产精品一区二区不卡| 中文字幕中文字幕在线一区 | 色综合天天性综合| 亚洲一区在线观看免费 | 91蝌蚪国产九色| 一区二区三区免费网站| 粉嫩嫩av羞羞动漫久久久| 久久久久久久久久久电影| 国v精品久久久网| 欧美国产一区二区在线观看| 99精品黄色片免费大全| 亚洲永久免费av| 欧美性感一类影片在线播放| 久久精品二区亚洲w码| 午夜久久久久久久久久一区二区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 色综合久久中文字幕综合网| 天堂va蜜桃一区二区三区|