hw_io_pin.h 577 B

1234567891011121314151617181920212223
  1. #ifndef __IO_PIN_H__
  2. #define __IO_PIN_H__
  3. typedef struct
  4. {
  5. void * io_register;
  6. unsigned short pin_mask;
  7. unsigned short valid_value;
  8. } hw_io_infomation_t;
  9. #define IO_PIN_INPUT_NUMBER 8
  10. #define IO_PIN_OUTPUT_NUMBER 6
  11. void hw_io_pin_init(void);
  12. void hw_io_pin_output(unsigned short index, int sta);
  13. int hw_io_pin_input(unsigned short index);
  14. void hw_io_output_enable(void);
  15. void hw_io_output_disable(void);
  16. int hw_io_get_input_pin_infomation(unsigned short index, hw_io_infomation_t * info);
  17. //int hw_io_power_is_off(void);
  18. //void hw_io_close_all(void);
  19. #endif