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

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

?? gpio.c

?? STM32+Grlib
?? C
?? 第 1 頁 / 共 4 頁
字號:
    //
    ASSERT(GPIOBaseValid(ulPort));

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

//*****************************************************************************
//
//! Writes a value to the specified pin(s).
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//! \param ucVal is the value to write to the pin(s).
//!
//! Writes the corresponding bit values to the output pin(s) specified by
//! \e ucPins.  Writing to a pin configured as an input pin has no effect.
//!
//! 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.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinWrite(unsigned long ulPort, unsigned char ucPins, unsigned char ucVal)
{
    //
    // Check the arguments.
    //
    ASSERT(GPIOBaseValid(ulPort));

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

//*****************************************************************************
//
//! Configures pin(s) for use as analog-to-digital converter inputs.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! The analog-to-digital converter input pins must be properly configured
//! to function correctly on DustDevil-class devices.  This function provides
//! the proper configuration for those pin(s).
//!
//! 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 ADC input; it only
//! configures an ADC input pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeADC(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 as a CAN device.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! The CAN pins must be properly configured for the CAN peripherals 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 CAN pin; it only
//! configures a CAN pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeCAN(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT(GPIOBaseValid(ulPort));

    //
    // Make the pin(s) be inputs.
    //
    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 as an analog comparator input.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! The analog comparator input pins must be properly configured for the analog
//! comparator to function correctly.  This function provides the proper
//! configuration for those pin(s).
//!
//! 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 analog comparator input;
//! it only configures an analog comparator pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeComparator(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 as GPIO inputs.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! The GPIO pins must be properly configured in order to function correctly as
//! GPIO inputs; this is especially true of Fury-class devices where the
//! digital input enable is turned off by default.  This function provides the
//! proper configuration for those pin(s).
//!
//! 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.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeGPIOInput(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 standard push-pull operation.
    //
    GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD);
}

//*****************************************************************************
//
//! Configures pin(s) for use as GPIO outputs.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! The GPIO pins must be properly configured in order to function correctly as
//! GPIO outputs; this is especially true of Fury-class devices where the
//! digital input enable is turned off by default.  This function provides the
//! proper configuration for those pin(s).
//!
//! 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.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeGPIOOutput(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT(GPIOBaseValid(ulPort));

    //
    // Make the pin(s) be outputs.
    //
    GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_OUT);

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

//*****************************************************************************
//
//! Configures pin(s) for use as GPIO open drain outputs.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! The GPIO pins must be properly configured in order to function correctly as
//! GPIO outputs; this is especially true of Fury-class devices where the
//! digital input enable is turned off by default.  This function provides the
//! proper configuration for those pin(s).
//!
//! 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.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeGPIOOutputOD(unsigned long ulPort, unsigned char ucPins)
{
    //
    // Check the arguments.
    //
    ASSERT(GPIOBaseValid(ulPort));

    //
    // Make the pin(s) be outputs.
    //
    GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_OUT);

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

//*****************************************************************************
//
//! Configures pin(s) for use by the I2C peripheral.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! The I2C pins must be properly configured for the I2C peripheral to function
//! correctly.  This function provides the proper configuration for those
//! pin(s).
//!
//! 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 I2C pin; it only
//! configures an I2C pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeI2C(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 open-drain operation with a weak pull-up.
    //
    GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_OD_WPU);
}

//*****************************************************************************
//
//! Configures pin(s) for use by the PWM peripheral.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! The PWM pins must be properly configured for the PWM 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 PWM pin; it only
//! configures a PWM pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypePWM(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 QEI peripheral.
//!
//! \param ulPort is the base address of the GPIO port.
//! \param ucPins is the bit-packed representation of the pin(s).
//!
//! The QEI pins must be properly configured for the QEI 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, not 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 QEI pin; it only
//! configures a QEI pin for proper operation.
//!
//! \return None.
//
//*****************************************************************************
void
GPIOPinTypeQEI(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 with a weak pull-up.
    //
    GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
}

//*****************************************************************************
//
//! Configures pin(s) for use by the SSI peripheral.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美在线1卡| 国产高清成人在线| 国内精品久久久久影院一蜜桃| 久久99国产精品免费网站| 国产成人在线视频网站| 91黄色免费版| 日韩欧美国产小视频| 欧美国产日韩精品免费观看| 亚洲精选视频免费看| 免费看欧美美女黄的网站| 高清av一区二区| 欧美人动与zoxxxx乱| 国产欧美一区二区精品仙草咪| 一区二区三区中文字幕| 蜜臀91精品一区二区三区| 成人性色生活片免费看爆迷你毛片| 色婷婷狠狠综合| 国产不卡在线播放| 日韩激情一区二区| 成人深夜福利app| 538prom精品视频线放| 国产精品天干天干在观线| 石原莉奈在线亚洲三区| 成人av网站在线观看| 欧美一区二区三区视频在线| 中文字幕在线不卡| 久久精品国产99| 在线免费av一区| 国产拍揄自揄精品视频麻豆| 香蕉久久一区二区不卡无毒影院| 高清在线不卡av| 91精品久久久久久久久99蜜臂| 成人欧美一区二区三区视频网页| 日韩高清电影一区| 国产成人精品一区二| 日韩一区二区视频在线观看| 亚洲自拍偷拍图区| 成人美女视频在线观看| 精品国产一区二区三区忘忧草| 香蕉加勒比综合久久| 91色porny在线视频| 国产欧美精品一区| 老司机精品视频导航| 欧美日韩高清影院| 一区二区三区四区不卡在线| 国产成人免费视频| 久久久久青草大香线综合精品| 日韩av一级片| 欧美三级韩国三级日本一级| 亚洲欧美另类在线| 99riav一区二区三区| 国产欧美日韩综合| 国产一区二区看久久| 精品裸体舞一区二区三区| 美女高潮久久久| 欧美一区二区免费观在线| 午夜欧美视频在线观看| 欧美偷拍一区二区| 亚洲乱码国产乱码精品精98午夜| 不卡电影一区二区三区| 欧美激情一区二区三区不卡| 激情综合一区二区三区| 精品国产91久久久久久久妲己| 婷婷六月综合网| 欧美精品 日韩| 日韩精品1区2区3区| 91精品久久久久久蜜臀| 免费高清在线视频一区·| 3751色影院一区二区三区| 亚洲成人av中文| 555夜色666亚洲国产免| 男人操女人的视频在线观看欧美| 欧美人妇做爰xxxⅹ性高电影| 首页综合国产亚洲丝袜| 欧美一级二级在线观看| 欧美大胆人体bbbb| 一区二区三区色| 欧美在线不卡视频| 亚洲成av人片| 日韩一区二区不卡| 国产麻豆成人传媒免费观看| 国产日韩视频一区二区三区| 成人深夜在线观看| 亚洲另类在线一区| 欧美午夜片在线观看| 五月婷婷综合激情| 日韩午夜精品电影| 国产乱子轮精品视频| 欧美激情一区二区三区在线| 91在线一区二区| 亚洲午夜激情av| 欧美草草影院在线视频| 高清视频一区二区| 亚洲精品高清在线| 欧美久久一区二区| 国产一区二区三区日韩| 日韩码欧中文字| 欧美男男青年gay1069videost | 日本大香伊一区二区三区| 亚洲国产毛片aaaaa无费看| 制服丝袜av成人在线看| 国产乱妇无码大片在线观看| 国产精品久久久久一区| 欧美日韩亚洲另类| 精品一区二区三区香蕉蜜桃| 国产清纯白嫩初高生在线观看91| 色婷婷av一区| 加勒比av一区二区| 亚洲欧美色综合| 日韩欧美一区中文| 成人精品一区二区三区中文字幕 | 色一情一伦一子一伦一区| 日日夜夜免费精品视频| 国产日韩精品一区| 欧美天堂一区二区三区| 国产麻豆日韩欧美久久| 一区二区三区高清| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 懂色av一区二区三区免费观看| 亚洲人吸女人奶水| 欧美videossexotv100| 99国产麻豆精品| 蜜臀av一区二区| 一区二区三区在线看| 精品国产sm最大网站免费看| 在线一区二区三区四区五区| 麻豆国产精品官网| 亚洲日本欧美天堂| 久久这里只有精品6| 在线观看成人免费视频| 久久精品人人做人人综合| 国产经典欧美精品| 日韩中文字幕91| 最新中文字幕一区二区三区| 欧美高清一级片在线| 91视频观看视频| 国产乱妇无码大片在线观看| 亚洲国产另类精品专区| 18成人在线观看| 久久久久久毛片| 欧美一区二区私人影院日本| av电影天堂一区二区在线观看| 精品无码三级在线观看视频| 亚洲香肠在线观看| 亚洲欧美日韩人成在线播放| 亚洲精品一区二区三区香蕉| 欧美日韩国产在线观看| 99精品欧美一区| 国产成人亚洲综合色影视| 日本人妖一区二区| 午夜激情久久久| 亚洲免费色视频| 中文字幕一区二区在线播放| 久久丝袜美腿综合| 欧美成人精精品一区二区频| 欧美婷婷六月丁香综合色| 色哟哟精品一区| 91亚洲国产成人精品一区二三| 国产91精品免费| 国内外精品视频| 国内一区二区视频| 激情五月激情综合网| 蜜臂av日日欢夜夜爽一区| 日韩国产精品大片| 亚洲va天堂va国产va久| 亚洲午夜视频在线| 一区二区在线电影| 亚洲美女在线国产| 亚洲精品国产视频| 一区二区三区成人| 亚洲女爱视频在线| 樱桃视频在线观看一区| 亚洲免费观看在线视频| 国产精品福利一区二区| 中文字幕一区二区三区精华液 | 粉嫩绯色av一区二区在线观看| 激情综合五月婷婷| 国产在线国偷精品产拍免费yy| 乱一区二区av| 国产呦精品一区二区三区网站| 极品尤物av久久免费看| 国产精品一区二区在线看| 国产一区二区三区国产| 国产成人精品影视| 成人动漫一区二区在线| 99久久精品免费看| 色婷婷久久久亚洲一区二区三区| 日本精品一区二区三区高清| 91福利精品视频| 欧美精品高清视频| 日韩欧美中文字幕公布| www精品美女久久久tv| 久久久国际精品| 欧美韩国日本不卡| 中文字幕一区二区不卡| 亚洲欧美激情插| 日韩精品欧美精品| 久久99久久久久久久久久久| 国产成人精品综合在线观看| 91在线精品秘密一区二区|