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

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

?? gpio.c

?? FreeRTOS V4.2.1,增加了AVR32 UC3 和 LPC2368 的支持
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):

//*****************************************************************************
//
//! Reads the values present at the specified pins of the selected GPIO port.
//!
//! \param ulPort base address of the selected GPIO port
//! \param ucPins bit-packed representation of the specified pins
//!
//! The values at the specified pins are read, as specified by \e ucPins.
//! Values are returned for both input and output pins, and the value
//! for pins that are not specified by \e ucPins are set to 0.
//!
//! The pins are specified using a bit-packed byte, where each bit that is
//! set identifies the pin to be accessed, and where bit 0 of the byte
//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, etc.
//!
//! \return Returns a bit-packed byte providing the state of the specified
//! pin, where bit 0 of the byte represents GPIO port pin 0, bit 1 represents
//! GPIO port pin 1, etc. Any bit that is not specified by \e ucPins
//! is returned as a 0. Bits 31:8 should be ignored.
//
//*****************************************************************************
#if defined(GROUP_pinread) || defined(BUILD_ALL) || defined(DOXYGEN)
long
GPIOPinRead(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTB_BASE) ||
           (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTD_BASE) ||
           (ulPort == GPIO_PORTE_BASE));

    //
    // Return the pin value(s).
    //
    return(HWREG(ulPort + (GPIO_O_DATA + (ucPins << 2))));
}
#endif

//*****************************************************************************
//
//! Writes a value at the specified pins of the selected GPIO port.
//!
//! \param ulPort base address of the selected GPIO port
//! \param ucPins bit-packed representation of the specified pins
//! \param ucVal value to write to the specified pins
//!
//! Writes the corresponding bit values to the output pins specified
//! by \e ucPins. Writing to a pin configured as an input pin has no
//! effect.
//!
//! The pins are specified using a bit-packed byte, where each bit that is
//! set identifies the pin to be accessed, and where bit 0 of the byte
//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, etc.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_pinwrite) || defined(BUILD_ALL) || defined(DOXYGEN)
void
GPIOPinWrite(unsigned long ulPort, unsigned char ucPins, unsigned char ucVal)
{
    //
    // Check the arguments.
    //
    ASSERT((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTB_BASE) ||
           (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTD_BASE) ||
           (ulPort == GPIO_PORTE_BASE));

    //
    // Write the pins.
    //
    HWREG(ulPort + (GPIO_O_DATA + (ucPins << 2))) = ucVal;
}
#endif

//*****************************************************************************
//
//! Configures pin(s) for use as an analog comparator input.
//!
//! \param ulPort base address of the selected GPIO port
//! \param ucPins bit-packed representation of the specified pins
//!
//! The analog comparator input pins must be properly configured for the analog
//! comparator to function correctly.  This function provides the proper
//! configuration for those pins.
//!
//! \note This cannot be used to turn any pin into an analog comparator input;
//! it only configures an analog comparator pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_pintypecomparator) || defined(BUILD_ALL) || defined(DOXYGEN)
void
GPIOPinTypeComparator(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTB_BASE) ||
           (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTD_BASE) ||
           (ulPort == GPIO_PORTE_BASE));

    //
    // Make the pin(s) be inputs.
    //
    GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN);

    //
    // Set the pad(s) for analog operation.
    //
    GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_ANALOG);
}
#endif

//*****************************************************************************
//
//! Configures pin(s) for use by the I2C peripheral.
//!
//! \param ulPort base address of the selected GPIO port
//! \param ucPins bit-packed representation of the specified pins
//!
//! The I2C pins must be properly configured for the I2C peripheral to function
//! correctly.  This function provides the proper configuration for those pins.
//!
//! \note This cannot be used to turn any pin into an I2C pin; it only
//! configures an I2C pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_pintypei2c) || defined(BUILD_ALL) || defined(DOXYGEN)
void
GPIOPinTypeI2C(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTB_BASE) ||
           (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTD_BASE) ||
           (ulPort == GPIO_PORTE_BASE));

    //
    // Make the pin(s) be peripheral controlled.
    //
    GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW);

    //
    // Set the pad(s) for open-drain operation with a weak pull-up.
    //
    GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_OD_WPU);
}
#endif

//*****************************************************************************
//
//! Configures pin(s) for use by the PWM peripheral.
//!
//! \param ulPort base address of the selected GPIO port
//! \param ucPins bit-packed representation of the specified pins
//!
//! The PWM pins must be properly configured for the PWM peripheral to function
//! correctly.  This function provides a typical configuration for those pins;
//! other configurations may work as well depending upon the board setup (for
//! example, using the on-chip pull-ups).
//!
//! \note This cannot be used to turn any pin into a PWM pin; it only
//! configures a PWM pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_pintypepwm) || defined(BUILD_ALL) || defined(DOXYGEN)
void
GPIOPinTypePWM(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTB_BASE) ||
           (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTD_BASE) ||
           (ulPort == GPIO_PORTE_BASE));

    //
    // Make the pin(s) be peripheral controlled.
    //
    GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW);

    //
    // Set the pad(s) for standard push-pull operation.
    //
    GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD);
}
#endif

//*****************************************************************************
//
//! Configures pin(s) for use by the QEI peripheral.
//!
//! \param ulPort base address of the selected GPIO port
//! \param ucPins bit-packed representation of the specified pins
//!
//! The QEI pins must be properly configured for the QEI peripheral to function
//! correctly.  This function provides a typical configuration for those pins;
//! other configurations may work as well depending upon the board setup (for
//! example, not using the on-chip pull-ups).
//!
//! \note This cannot be used to turn any pin into a QEI pin; it only
//! configures a QEI pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_pintypeqei) || defined(BUILD_ALL) || defined(DOXYGEN)
void
GPIOPinTypeQEI(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTB_BASE) ||
           (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTD_BASE) ||
           (ulPort == GPIO_PORTE_BASE));

    //
    // Make the pin(s) be peripheral controlled.
    //
    GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW);

    //
    // Set the pad(s) for standard push-pull operation with a weak pull-up.
    //
    GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
}
#endif

//*****************************************************************************
//
//! Configures pin(s) for use by the SSI peripheral.
//!
//! \param ulPort base address of the selected GPIO port
//! \param ucPins bit-packed representation of the specified pins
//!
//! The SSI pins must be properly configured for the SSI peripheral to function
//! correctly.  This function provides a typical configuration for those pins;
//! other configurations may work as well depending upon the board setup (for
//! example, using the on-chip pull-ups).
//!
//! \note This cannot be used to turn any pin into a SSI pin; it only
//! configures a SSI pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_pintypessi) || defined(BUILD_ALL) || defined(DOXYGEN)
void
GPIOPinTypeSSI(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTB_BASE) ||
           (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTD_BASE) ||
           (ulPort == GPIO_PORTE_BASE));

    //
    // Make the pin(s) be peripheral controlled.
    //
    GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW);

    //
    // Set the pad(s) for standard push-pull operation.
    //
    GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD);
}
#endif

//*****************************************************************************
//
//! Configures pin(s) for use by the Timer peripheral.
//!
//! \param ulPort base address of the selected GPIO port
//! \param ucPins bit-packed representation of the specified pins
//!
//! The CCP pins must be properly configured for the timer peripheral to
//! function correctly.  This function provides a typical configuration for
//! those pins; other configurations may work as well depending upon the board
//! setup (for example, using the on-chip pull-ups).
//!
//! \note This cannot be used to turn any pin into a timer pin; it only
//! configures a timer pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_pintypetimer) || defined(BUILD_ALL) || defined(DOXYGEN)
void
GPIOPinTypeTimer(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTB_BASE) ||
           (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTD_BASE) ||
           (ulPort == GPIO_PORTE_BASE));

    //
    // Make the pin(s) be peripheral controlled.
    //
    GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW);

    //
    // Set the pad(s) for standard push-pull operation.
    //
    GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD);
}
#endif

//*****************************************************************************
//
//! Configures pin(s) for use by the UART peripheral.
//!
//! \param ulPort base address of the selected GPIO port
//! \param ucPins bit-packed representation of the specified pins
//!
//! The UART pins must be properly configured for the UART peripheral to
//! function correctly.  This function provides a typical configuration for
//! those pins; other configurations may work as well depending upon the board
//! setup (for example, using the on-chip pull-ups).
//!
//! \note This cannot be used to turn any pin into a UART pin; it only
//! configures a UART pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_pintypeuart) || defined(BUILD_ALL) || defined(DOXYGEN)
void
GPIOPinTypeUART(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTB_BASE) ||
           (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTD_BASE) ||
           (ulPort == GPIO_PORTE_BASE));

    //
    // Make the pin(s) be peripheral controlled.
    //
    GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW);

    //
    // Set the pad(s) for standard push-pull operation.
    //
    GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD);
}
#endif

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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日日骚欧美日韩| 国产亚洲欧美日韩日本| 午夜天堂影视香蕉久久| 欧美日韩国产免费一区二区| 午夜伦理一区二区| 91精品综合久久久久久| 国产综合成人久久大片91| 欧美精品一区二| 成人免费观看av| 亚洲伦在线观看| 91精品婷婷国产综合久久性色| 久久精品国产网站| 欧美国产日本韩| 欧美亚洲综合久久| 97精品电影院| 亚洲一区二区三区在线播放| 日韩一级在线观看| 岛国一区二区在线观看| 夜色激情一区二区| 精品少妇一区二区三区日产乱码| 国产成人免费在线视频| 一区二区三区资源| 日韩精品一区在线| 91丝袜高跟美女视频| 亚洲成人午夜电影| 久久久久久久性| 欧美亚洲国产一区二区三区va| 青娱乐精品视频在线| 国产精品午夜在线观看| 欧美日韩免费观看一区二区三区| 国产一区二区三区四区五区入口 | 国产视频一区在线播放| 在线精品视频小说1| 久久99久久99| 悠悠色在线精品| 久久综合中文字幕| 欧美三日本三级三级在线播放| 久久国产生活片100| 亚洲免费观看高清在线观看| 欧美成人一区二区| 色噜噜久久综合| 国产伦精品一区二区三区在线观看 | 欧美日韩一区二区三区不卡| 国产一区日韩二区欧美三区| 亚洲一区自拍偷拍| 国产欧美日韩在线| 欧美一区二区福利视频| 91亚洲精华国产精华精华液| 精品亚洲国内自在自线福利| 一区二区三区中文在线| 亚洲国产成人午夜在线一区| 欧美一二三区精品| 欧美综合视频在线观看| 大白屁股一区二区视频| 精一区二区三区| 天天综合网 天天综合色| 一区视频在线播放| 国产亚洲欧美一区在线观看| 91精品国产综合久久久久久| 色噜噜狠狠成人网p站| 成人黄色国产精品网站大全在线免费观看 | 一区二区三区在线免费| 国产精品三级av| 精品国产乱码久久久久久夜甘婷婷| 91久久精品日日躁夜夜躁欧美| 福利电影一区二区| 国产一区二区调教| 裸体歌舞表演一区二区| 日本不卡一区二区三区高清视频| 亚洲成人综合视频| 悠悠色在线精品| 一区二区三区欧美日| 国产精品嫩草99a| 国产精品欧美久久久久无广告| 久久亚洲免费视频| 亚洲精品在线网站| 欧美不卡123| 精品久久久久久综合日本欧美 | 亚洲精品在线免费播放| 日韩精品一区二区三区老鸭窝| 制服丝袜日韩国产| 在线91免费看| 日韩欧美专区在线| 日韩欧美中文一区| 欧美精品精品一区| 7777精品伊人久久久大香线蕉的| 欧美日韩国产精选| 欧美精品三级日韩久久| 91精品国产一区二区人妖| 777色狠狠一区二区三区| 91麻豆精品国产91久久久久久久久 | 久久久久久麻豆| 国产欧美一区二区精品婷婷| 亚洲国产电影在线观看| 亚洲丝袜美腿综合| 亚洲国产精品久久人人爱蜜臀 | 91亚洲大成网污www| 欧洲一区二区av| 欧美一区二区三区在线看| 欧美大片在线观看一区二区| 久久久久成人黄色影片| 国产精品久久久久国产精品日日| 亚洲欧美日韩国产成人精品影院 | 亚洲人成在线播放网站岛国| 亚洲国产毛片aaaaa无费看| 肉肉av福利一精品导航| 久久精品99国产国产精| 成人黄页在线观看| 欧美视频一区二区三区在线观看| 777a∨成人精品桃花网| 欧美激情综合五月色丁香小说| 日韩毛片高清在线播放| 日韩精品一二三区| 国产在线观看免费一区| 91亚洲国产成人精品一区二三| 911国产精品| 国产欧美日韩视频一区二区| 一二三四社区欧美黄| 久久国产日韩欧美精品| 91最新地址在线播放| 欧美一区二区三区免费视频 | 日韩精品一区二区在线| 亚洲色图制服诱惑| 美女在线观看视频一区二区| 成人国产精品免费观看视频| 一色桃子久久精品亚洲| 免费在线欧美视频| 99久久久无码国产精品| 欧美一区二区三区在线视频| 亚洲欧美日韩中文播放| 韩国欧美一区二区| 91传媒视频在线播放| 国产偷国产偷精品高清尤物| 亚洲成人免费在线| 成人午夜精品在线| 日韩丝袜情趣美女图片| 亚洲欧美激情小说另类| 国内精品嫩模私拍在线| 欧美日韩综合一区| 亚洲欧美中日韩| 国内成人精品2018免费看| 91官网在线免费观看| 国产欧美一区二区精品忘忧草| 免费三级欧美电影| 在线免费观看日韩欧美| 国产精品网站在线观看| 狠狠狠色丁香婷婷综合激情| 欧美日韩精品一区二区三区四区 | 成人综合在线观看| 日韩欧美国产系列| 亚洲不卡在线观看| 色综合天天性综合| 欧美激情在线免费观看| 国产一区二区三区观看| 欧美理论电影在线| 亚洲成人一区二区在线观看| 欧洲视频一区二区| 亚洲人成网站色在线观看 | 色婷婷亚洲精品| 日韩毛片视频在线看| 99精品久久99久久久久| 国产欧美日韩不卡免费| 国产麻豆91精品| 午夜欧美视频在线观看| 欧美性受极品xxxx喷水| 夜夜嗨av一区二区三区中文字幕| 99国产精品一区| 亚洲视频网在线直播| 91小视频免费观看| 亚洲久草在线视频| 色婷婷狠狠综合| 亚洲一区二区三区四区五区中文| 色综合久久中文综合久久97| 亚洲视频在线一区| 91高清视频免费看| 亚洲一区二区三区四区在线免费观看 | 精品少妇一区二区三区免费观看| 精油按摩中文字幕久久| 精品va天堂亚洲国产| 国产精品一区二区三区乱码| 久久久精品一品道一区| 丁香亚洲综合激情啪啪综合| 国产精品日产欧美久久久久| 91香蕉视频污在线| 亚洲夂夂婷婷色拍ww47| 欧美日韩国产成人在线免费| 日本不卡一二三| 日韩一区二区中文字幕| 精品成人免费观看| 久久久高清一区二区三区| 国产精品无人区| 天堂影院一区二区| 欧美变态tickle挠乳网站| 黑人巨大精品欧美黑白配亚洲| 国产日韩成人精品| 色综合久久88色综合天天| 亚洲一区免费观看| 欧美一二三四在线| av一区二区久久| 日日嗨av一区二区三区四区|