Mirror of CollapseOS
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

21 行
448B

  1. #pragma once
  2. #include "emul.h"
  3. // Each port is a bitmask of each pin's status. 1 means high.
  4. // From Bit 0 to 6: up, down, left, right, TL, TR, TH
  5. typedef struct {
  6. uint8_t ctl;
  7. Tristate TRA;
  8. Tristate THA;
  9. Tristate TRB;
  10. Tristate THB;
  11. IORD portA_rd;
  12. IORD portB_rd;
  13. } Ports;
  14. void ports_init(Ports *ports);
  15. void ports_ctl_wr(Ports *ports, uint8_t val);
  16. uint8_t ports_A_rd(Ports *ports);
  17. uint8_t ports_B_rd(Ports *ports);