STM32库函数uint8_t GPIO_ReadInputDataBit ( GPIO_TypeDef * GPIOx, uint16_t GPIO_Pin )

来源:互联网 发布:什么是大数据挖掘 编辑:程序博客网 时间:2024/06/05 12:42
uint8_t GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)

Reads the specified input port pin.
Parameters:
GPIOx,:where x can be (A..G) to select the GPIO peripheral.GPIO_Pin,:specifies the port bit to read. This parameter can be GPIO_Pin_x where x can be (0..15).
Return values:
Theinput port pin value. 

函数作用:读取指定的输入端口引脚状态(0或者1)。

参数:

输入:GPIO_TypeDef* GPIOx,所用到管脚的GPIO组

            uint16_t GPIO_Pin,所要读取的管脚,如GPIO_Pin_13

输出:0或者1,所读管脚的高低电平状态!


0 0
原创粉丝点击