12345678910111213141516171819 |
- #ifndef PIN_H__
- #define PIN_H__
- #include "rtdef.h"
- #define PIN_LOW 0x00
- #define PIN_HIGH 0x01
- #define PIN_MODE_OUTPUT 0x00
- #define PIN_MODE_INPUT 0x01
- #define PIN_MODE_INPUT_PULLUP 0x02
- #define PIN_MODE_INPUT_PULLDOWN 0x03
- #define PIN_MODE_OUTPUT_OD 0x04
- void rt_pin_mode(rt_base_t pin, rt_base_t mode);
- void rt_pin_write(rt_base_t pin, rt_base_t value);
- int rt_pin_read(rt_base_t pin);
- #endif
|