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

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

?? gpio.c

?? freertosV4.40 是一種small的嵌入式系統。利于嵌入式開好者入門學習嵌入式操作系統。通過對于源碼的學習可以很好的掌握freertos的運行機制。
?? C
?? 第 1 頁 / 共 3 頁
字號:

//*****************************************************************************
//
//! 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.
//! @}
//
//*****************************************************************************

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
另类专区欧美蜜桃臀第一页| 视频一区二区中文字幕| 中文字幕精品一区二区三区精品| 久久精品欧美日韩| 中文字幕在线不卡一区二区三区| 中文字幕欧美激情一区| 日本一区二区三区四区在线视频 | 精品久久久三级丝袜| 国产欧美日韩综合| 亚洲精品少妇30p| 精品一区二区三区日韩| jiyouzz国产精品久久| 欧美三级视频在线观看| 欧美成人激情免费网| 久久久精品2019中文字幕之3| 久久久久久久精| 亚洲永久精品国产| 国产精品1024| 日本高清免费不卡视频| 精品日韩在线观看| 亚洲男人的天堂网| 午夜一区二区三区视频| 国产成人免费视频网站| 欧美成人a∨高清免费观看| 亚洲国产视频一区| 欧美性生交片4| 亚洲一区日韩精品中文字幕| 99精品国产视频| 亚洲色图都市小说| 日本乱码高清不卡字幕| 国产日韩欧美在线一区| 国产米奇在线777精品观看| 欧美伊人久久大香线蕉综合69| 国产精品大尺度| 色美美综合视频| 一区二区三区四区不卡视频| 91福利社在线观看| 亚洲国产综合在线| 欧美日韩久久久| 亚洲午夜电影在线| 99久久久免费精品国产一区二区 | 精品影视av免费| 精品国产一二三| 国产精品羞羞答答xxdd| 日本一区免费视频| 国产一区二区成人久久免费影院| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 9191久久久久久久久久久| 香蕉影视欧美成人| 538在线一区二区精品国产| 激情五月激情综合网| 国产欧美一区在线| 91美女福利视频| 视频一区免费在线观看| 久久亚洲综合色| 在线视频国产一区| 国内精品国产成人国产三级粉色| 亚洲欧美自拍偷拍色图| 欧美一区二区日韩一区二区| 粉嫩aⅴ一区二区三区四区五区| 亚洲欧美色图小说| 国产区在线观看成人精品| 欧美午夜精品一区二区三区| 激情综合色综合久久| 一区二区三区四区五区视频在线观看| 欧美人与z0zoxxxx视频| 成人av在线电影| 青青草伊人久久| 樱花草国产18久久久久| 欧美成人精品二区三区99精品| 99精品久久只有精品| 不卡的av在线播放| 国模一区二区三区白浆| 免费成人av在线播放| 午夜激情一区二区三区| 亚洲少妇30p| 国产精品网友自拍| 日韩美女在线视频 | 亚洲天堂网中文字| 亚洲国产成人私人影院tom| 国产网站一区二区| 日本一二三四高清不卡| 亚洲一区二区三区中文字幕在线| 伊人色综合久久天天人手人婷| 日韩国产欧美一区二区三区| 极品美女销魂一区二区三区免费| 精品无人区卡一卡二卡三乱码免费卡| 日日夜夜精品免费视频| 久久精品国产99久久6| 成人性生交大片免费看中文| 91麻豆国产精品久久| 9191久久久久久久久久久| 中文字幕成人av| 日韩二区三区在线观看| 麻豆91精品91久久久的内涵| 国产a久久麻豆| 91麻豆精品国产91久久久久久久久| 2021国产精品久久精品| 一区二区三区电影在线播| 亚洲午夜电影网| 成人av电影在线播放| 欧美一区二区视频在线观看2020 | 亚洲成av人影院| 国内精品久久久久影院色| 91国产成人在线| 久久一区二区三区四区| 欧美激情在线看| 日产国产欧美视频一区精品 | 日韩欧美一卡二卡| 午夜免费久久看| 三级影片在线观看欧美日韩一区二区 | 91精品国产综合久久福利软件| 久久se精品一区精品二区| 国产精品成人在线观看| 欧美电影影音先锋| 成人avav影音| 天天操天天干天天综合网| 国产精品国产a| 欧美r级在线观看| 国产成人av电影在线| 婷婷国产v国产偷v亚洲高清| 18成人在线观看| 亚洲免费大片在线观看| 国产午夜亚洲精品午夜鲁丝片 | 亚洲欧美一区二区三区极速播放 | 欧美精品久久99| 欧美三级蜜桃2在线观看| 色呦呦日韩精品| 欧美综合色免费| 欧美性受极品xxxx喷水| 久久精品72免费观看| 久久精品人人做人人综合| 欧美午夜精品久久久久久超碰| 亚洲国产视频a| 亚洲伦理在线精品| 国产精品毛片大码女人| 亚洲欧美在线另类| ww亚洲ww在线观看国产| 欧美成人vps| 欧美韩国日本一区| 国产精品国产三级国产普通话三级 | 欧美日韩成人一区| 欧美美女一区二区| 亚洲精品一区二区三区精华液 | 国产精品污网站| 欧美高清一级片在线观看| 国产精品水嫩水嫩| 亚洲欧美区自拍先锋| 亚洲gay无套男同| 亚洲成人免费观看| 亚洲免费在线看| 亚洲国产视频a| 精品一区二区三区视频在线观看| 国产成人午夜视频| 91免费观看在线| 欧美日韩精品免费| 国产午夜精品福利| 中文字幕日韩精品一区| 亚洲裸体在线观看| 日本亚洲一区二区| av影院午夜一区| 欧美一区二区三区在| 中文字幕亚洲区| 亚洲一区二区三区美女| 精品一区二区在线看| 色狠狠综合天天综合综合| 日韩欧美在线不卡| 亚洲男人天堂一区| 国产成人精品www牛牛影视| 欧美三级日韩三级国产三级| 中文字幕日本不卡| 亚洲bt欧美bt精品| 日韩精品福利网| 国产一区二区三区在线观看精品| 韩国成人在线视频| 色综合天天狠狠| 欧美极品美女视频| 国产在线不卡视频| 日韩午夜激情视频| 精品国产成人系列| 蜜臀a∨国产成人精品| 国产a级毛片一区| 欧美精品久久99久久在免费线 | 九九**精品视频免费播放| 亚洲成人资源网| 综合自拍亚洲综合图不卡区| 在线一区二区视频| 午夜精品一区二区三区电影天堂 | 欧美变态口味重另类| 亚洲精品免费在线| 亚洲午夜久久久久久久久电影院 | 亚洲一区二区三区国产| 色久优优欧美色久优优| 亚洲丝袜制服诱惑| 91原创在线视频| 一区二区三区中文免费| 成人午夜精品一区二区三区| 国产欧美一区二区三区鸳鸯浴 | 国产精品一区二区黑丝| 中文字幕色av一区二区三区|