pin.h 425 B

12345678910111213141516171819
  1. #ifndef PIN_H__
  2. #define PIN_H__
  3. #include "rtdef.h"
  4. #define PIN_LOW 0x00
  5. #define PIN_HIGH 0x01
  6. #define PIN_MODE_OUTPUT 0x00
  7. #define PIN_MODE_INPUT 0x01
  8. #define PIN_MODE_INPUT_PULLUP 0x02
  9. #define PIN_MODE_INPUT_PULLDOWN 0x03
  10. #define PIN_MODE_OUTPUT_OD 0x04
  11. void rt_pin_mode(rt_base_t pin, rt_base_t mode);
  12. void rt_pin_write(rt_base_t pin, rt_base_t value);
  13. int rt_pin_read(rt_base_t pin);
  14. #endif