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

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

?? gpio.c

?? STM32+Grlib
?? C
?? 第 1 頁 / 共 4 頁
字號:
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! The SSI pins must be properly configured for the SSI peripheral to function
//! correctly.  This function provides a typical configuration for those
//! pin(s); other configurations may work as well depending upon the board
//! setup (for example, using the on-chip pull-ups).
//!
//! The pin(s) 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, and so on.
//!
//! \note This cannot be used to turn any pin into a SSI pin; it only
//! configures a SSI pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeSSI(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT(GPIOBaseValid(ulPort));

    //
    // 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);
}

//*****************************************************************************
//
//! Configures pin(s) for use by the Timer peripheral.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! The CCP pins must be properly configured for the timer peripheral to
//! function correctly.  This function provides a typical configuration for
//! those pin(s); other configurations may work as well depending upon the
//! board setup (for example, using the on-chip pull-ups).
//!
//! The pin(s) 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, and so on.
//!
//! \note This cannot be used to turn any pin into a timer pin; it only
//! configures a timer pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeTimer(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT(GPIOBaseValid(ulPort));

    //
    // 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);
}

//*****************************************************************************
//
//! Configures pin(s) for use by the UART peripheral.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! The UART pins must be properly configured for the UART peripheral to
//! function correctly.  This function provides a typical configuration for
//! those pin(s); other configurations may work as well depending upon the
//! board setup (for example, using the on-chip pull-ups).
//!
//! The pin(s) 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, and so on.
//!
//! \note This cannot be used to turn any pin into a UART pin; it only
//! configures a UART pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeUART(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT(GPIOBaseValid(ulPort));

    //
    // 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);
}

//*****************************************************************************
//
//! Configures pin(s) for use by the USB peripheral.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! Some USB digital pins must be properly configured for the USB peripheral to
//! function correctly.  This function provides a typical configuration for
//! the digital USB pin(s); other configurations may work as well depending
//! upon the board setup (for example, using the on-chip pull-ups).
//!
//! This function should only be used with EPEN and PFAULT pins as all other
//! USB pins are analog in nature or are not used in devices without OTG
//! functionality.
//!
//! The pin(s) 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, and so on.
//!
//! \note This cannot be used to turn any pin into a USB pin; it only
//! configures a USB pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeUSBDigital(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT(GPIOBaseValid(ulPort));

    //
    // 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);
}

//*****************************************************************************
//
//! Configures pin(s) for use by the USB peripheral.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! Some USB analog pins must be properly configured for the USB peripheral to
//! function correctly.  This function provides the proper configuration for
//! any USB pin(s).  This can also be used to configure the EPEN and PFAULT pins
//! so that they are no longer used by the USB controller.
//!
//! The pin(s) 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, and so on.
//!
//! \note This cannot be used to turn any pin into a USB pin; it only
//! configures a USB pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeUSBAnalog(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT(GPIOBaseValid(ulPort));

    //
    // 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);
}

//*****************************************************************************
//
//! Configures pin(s) for use by the I2S peripheral.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! Some I2S pins must be properly configured for the I2S peripheral to
//! function correctly.  This function provides a typical configuration for
//! the digital I2S pin(s); other configurations may work as well depending
//! upon the board setup (for example, using the on-chip pull-ups).
//!
//! The pin(s) 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, and so on.
//!
//! \note This cannot be used to turn any pin into a I2S pin; it only
//! configures a I2S pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeI2S(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT(GPIOBaseValid(ulPort));

    //
    // 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);
}

//*****************************************************************************
//
//! Configures pin(s) for use by the Ethernet peripheral as LED signals.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! The Ethernet peripheral provides two signals that can be used to drive
//! an LED (e.g. for link status/activity).  This function provides a typical
//! configuration for the pins.
//!
//! The pin(s) 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, and so on.
//!
//! \note This cannot be used to turn any pin into an Ethernet LED pin; it only
//! configures an Ethernet LED pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeEthernetLED(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT(GPIOBaseValid(ulPort));

    //
    // 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_8MA, GPIO_PIN_TYPE_STD);
}

//*****************************************************************************
//
//! Configures pin(s) for use by the external peripheral interface.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! The external peripheral interface pins must be properly configured for the
//! external peripheral interface to function correctly.  This function
//! provides a typica configuration for those pin(s); other configurations may
//! work as well depending upon the board setup (for exampe, using the on-chip
//! pull-ups).
//!
//! The pin(s) 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, and so on.
//!
//! \note This cannot be used to turn any pin into an external peripheral
//! interface pin; it only configures an external peripheral interface pin for
//! proper operation.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeEPI(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT(GPIOBaseValid(ulPort));

    //
    // 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_8MA, GPIO_PIN_TYPE_STD);
}

//*****************************************************************************
//
//! Configures the alternate function of a GPIO pin.
//!
//! \param ulPinConfig is the pin configuration value, specified as only one of
//! the \b GPIO_P??_??? values.
//!
//! This function configures the pin mux that selects the peripheral function
//! associated with a particular GPIO pin.  Only one peripheral function at a
//! time can be associated with a GPIO pin, and each peripheral function should
//! only be associated with a single GPIO pin at a time (despite the fact that
//! many of them can be associated with more than one GPIO pin).
//!
//! \note This function is only valid on Tempest-class devices.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinConfigure(unsigned long ulPinConfig)
{
    unsigned long ulBase, ulShift;

    //
    // Check the argument.
    //
    ASSERT(((ulPinConfig >> 16) & 0xff) < 9);
    ASSERT(((ulPinConfig >> 8) & 0xe3) == 0);

    //
    // Extract the base address index from the input value.
    //
    ulBase = (ulPinConfig >> 16) & 0xff;

    //
    // Get the base address of the GPIO module, selecting either the APB or the
    // AHB aperture as appropriate.
    //
    if(HWREG(SYSCTL_GPIOHSCTL) & (1 << ulBase))
    {
        ulBase = g_pulGPIOBaseAddrs[(ulBase << 1) + 1];
    }
    else
    {
        ulBase = g_pulGPIOBaseAddrs[ulBase << 1];
    }

    //
    // Extract the shift from the input value.
    //
    ulShift = (ulPinConfig >> 8) & 0xff;

    //
    // Write the requested pin muxing value for this GPIO pin.
    //
    HWREG(ulBase + GPIO_O_PCTL) = ((HWREG(ulBase + GPIO_O_PCTL) &
                                    ~(0xf << ulShift)) |
                                   ((ulPinConfig & 0xf) << ulShift));

}

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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看一区日韩| 99精品视频中文字幕| 7878成人国产在线观看| 日本不卡视频在线| 欧美大片免费久久精品三p| 精品伊人久久久久7777人| 欧美成人一区二区三区在线观看| 国产呦精品一区二区三区网站| 日本一区二区三区免费乱视频 | 久久久777精品电影网影网 | 久久狠狠亚洲综合| 中文字幕av一区二区三区| 91亚洲精品乱码久久久久久蜜桃| 亚洲一区二区三区在线看| 欧美日韩一区不卡| 国产成人丝袜美腿| 亚洲丶国产丶欧美一区二区三区| 欧美电视剧免费观看| 成人av电影观看| 亚洲18影院在线观看| 久久久久久97三级| 欧美亚洲自拍偷拍| 国产麻豆成人传媒免费观看| 亚洲精品国产成人久久av盗摄| 欧美一区二区三区日韩视频| 成人av在线电影| 视频一区视频二区中文| 国产精品色婷婷久久58| 8x福利精品第一导航| 成人白浆超碰人人人人| 日韩av一二三| 亚洲免费色视频| 久久久久久久久久久久电影| 欧美视频日韩视频在线观看| 高清不卡一区二区在线| 日本免费新一区视频| 亚洲人亚洲人成电影网站色| 欧美xxxxxxxx| 欧美日韩综合不卡| 91视频观看视频| 国产精品一区二区视频| 日本欧美一区二区在线观看| 中文字幕一区在线观看视频| 精品国产一区二区三区av性色| 91亚洲国产成人精品一区二区三| 久久精品国产**网站演员| 一区二区三区四区蜜桃| 国产精品无码永久免费888| 欧美一区二区网站| 欧美午夜精品理论片a级按摩| 国产不卡高清在线观看视频| 美女性感视频久久| 亚洲成a人在线观看| 亚洲欧美激情小说另类| 国产精品视频一二三| 久久综合久久99| 91精品蜜臀在线一区尤物| 欧洲一区二区av| 色综合婷婷久久| av激情综合网| 成人av在线一区二区三区| 高清beeg欧美| 成人动漫中文字幕| av在线不卡电影| 东方欧美亚洲色图在线| 国产福利一区二区三区视频| 韩国一区二区三区| 国内精品国产成人国产三级粉色 | 美女网站一区二区| 午夜精品福利一区二区蜜股av| 亚洲人成7777| 一区二区三区欧美| 亚洲伊人色欲综合网| 一区二区三区在线观看欧美| 夜夜夜精品看看| 亚洲午夜久久久久久久久电影院| 亚洲蜜臀av乱码久久精品| 日韩美女视频一区二区 | a级高清视频欧美日韩| 成人av电影免费在线播放| 白白色亚洲国产精品| 色综合天天视频在线观看| 色狠狠一区二区三区香蕉| 欧美色窝79yyyycom| 制服丝袜一区二区三区| 日韩你懂的在线观看| 久久久不卡网国产精品一区| 国产欧美精品一区二区色综合| 国产欧美日本一区二区三区| 一区视频在线播放| 亚洲激情欧美激情| 午夜av一区二区三区| 美女免费视频一区| 国内精品久久久久影院薰衣草 | 日韩一二在线观看| 欧美v日韩v国产v| 国产欧美一区二区精品性色超碰| 亚洲欧洲国产日韩| 亚洲电影第三页| 国产在线视视频有精品| 97久久精品人人爽人人爽蜜臀| 欧美在线观看视频一区二区| 538在线一区二区精品国产| 久久综合狠狠综合久久激情| 中文字幕在线观看一区| 日韩电影免费在线观看网站| 国产精品羞羞答答xxdd| 色素色在线综合| 日韩精品中文字幕在线不卡尤物| 中文字幕 久热精品 视频在线| 一区二区三区欧美日| 国产在线观看一区二区| 色欧美乱欧美15图片| 精品美女在线观看| 一级日本不卡的影视| 国产在线播精品第三| 在线观看日韩毛片| 欧美经典三级视频一区二区三区| 亚洲第一久久影院| 成人av电影免费观看| 日韩一二在线观看| 亚洲精品成人悠悠色影视| 久久精品国产免费看久久精品| 91亚洲资源网| 国产欧美精品区一区二区三区| 亚州成人在线电影| 99国内精品久久| 精品日韩在线观看| 婷婷国产在线综合| 99久久国产免费看| 国产三级精品三级| 精品一区二区三区在线视频| 99久久精品免费看国产免费软件| 欧美一级搡bbbb搡bbbb| 亚洲免费伊人电影| 成人动漫一区二区| 久久精品无码一区二区三区| 日韩av电影天堂| 欧美日韩亚洲综合一区| 国产精品的网站| 国产成人av福利| 精品三级在线观看| 美女任你摸久久| 91精品啪在线观看国产60岁| 依依成人综合视频| 91免费观看在线| 国产精品免费丝袜| 国产成人午夜99999| 欧美videossexotv100| 人人狠狠综合久久亚洲| 欧美美女直播网站| 亚洲高清免费视频| 欧美综合色免费| 亚洲一区二区三区四区在线观看 | 亚洲二区在线观看| 色偷偷久久一区二区三区| 国产精品高潮久久久久无| 国产精品1024久久| 国产亚洲综合性久久久影院| 精品一区二区影视| 久久久综合九色合综国产精品| 久久av中文字幕片| 亚洲精品一区二区三区99| 久久国产精品99精品国产 | 国产成人8x视频一区二区| 久久久久国产精品麻豆ai换脸| 久久99久久精品欧美| 久久中文娱乐网| 国产电影精品久久禁18| 国产偷国产偷精品高清尤物| 成人av在线资源网| 亚洲欧美日韩电影| 欧洲一区在线电影| 日韩一区精品视频| 欧美大白屁股肥臀xxxxxx| 麻豆精品蜜桃视频网站| 久久女同精品一区二区| 成人在线视频一区二区| 亚洲九九爱视频| 欧美日本一区二区三区四区| 日产欧产美韩系列久久99| 26uuu国产电影一区二区| 高清不卡在线观看av| 亚洲精品高清视频在线观看| 欧美午夜电影在线播放| 免费xxxx性欧美18vr| 国产丝袜美腿一区二区三区| 不卡的看片网站| 性感美女极品91精品| 精品日韩99亚洲| av在线播放成人| 日本伊人精品一区二区三区观看方式| 精品日韩一区二区三区免费视频| 丁香激情综合五月| 亚洲一级电影视频| 久久久91精品国产一区二区三区| 色综合久久88色综合天天| 老司机精品视频在线| 亚洲欧洲三级电影| 91精品国产一区二区人妖|