1
0
Эх сурвалжийг харах

[DeviceDrivers]添加pin开漏和下拉输入宏

[DeviceDrivers]添加pin开漏和下拉输入宏
MiraculousConch 7 жил өмнө
parent
commit
77cd229a99

+ 3 - 0
components/drivers/include/drivers/pin.h

@@ -20,6 +20,7 @@
  * Change Logs:
  * Change Logs:
  * Date           Author       Notes
  * Date           Author       Notes
  * 2015-01-20     Bernard      the first version
  * 2015-01-20     Bernard      the first version
+ * 2017-10-20      ZYH          add mode open drain and input pull down
  */
  */
 
 
 #ifndef PIN_H__
 #ifndef PIN_H__
@@ -49,6 +50,8 @@ struct rt_device_pin
 #define PIN_IRQ_MODE_RISING             0x00
 #define PIN_IRQ_MODE_RISING             0x00
 #define PIN_IRQ_MODE_FALLING            0x01
 #define PIN_IRQ_MODE_FALLING            0x01
 #define PIN_IRQ_MODE_RISING_FALLING     0x02
 #define PIN_IRQ_MODE_RISING_FALLING     0x02
+#define PIN_MODE_INPUT_PULLDOWN 0x03
+#define PIN_MODE_OUTPUT_OD      0x04
 
 
 #define PIN_IRQ_DISABLE                 0x00
 #define PIN_IRQ_DISABLE                 0x00
 #define PIN_IRQ_ENABLE                  0x01
 #define PIN_IRQ_ENABLE                  0x01