aboutsummaryrefslogtreecommitdiff
path: root/examples/io/system573/k573io.h
diff options
context:
space:
mode:
authorspicyjpeg <88942473+spicyjpeg@users.noreply.github.com>2022-06-27 22:18:11 +0200
committerspicyjpeg <88942473+spicyjpeg@users.noreply.github.com>2022-06-27 22:18:11 +0200
commitef776e728cfa67fbca38bb375152b336fa0b5200 (patch)
tree4eea0faf910d2671446c3f1ff1b9714d23e53cb7 /examples/io/system573/k573io.h
parentf56ade9b10c7c2d37f1b0af9191560cd5f0295b4 (diff)
downloadpsn00bsdk-ef776e728cfa67fbca38bb375152b336fa0b5200.tar.gz
Clean up io/system573 example and libpsxpress
Diffstat (limited to 'examples/io/system573/k573io.h')
-rw-r--r--examples/io/system573/k573io.h38
1 files changed, 21 insertions, 17 deletions
diff --git a/examples/io/system573/k573io.h b/examples/io/system573/k573io.h
index 7095a7c..424e3e4 100644
--- a/examples/io/system573/k573io.h
+++ b/examples/io/system573/k573io.h
@@ -25,6 +25,7 @@
#define K573_IO_BOARD ((volatile uint16_t *) 0x1f640000)
typedef enum _K573_IOChipRegister {
+ IO_REG_OUT0 = 0x0,
IO_REG_IN0 = 0x0,
IO_REG_IN1_LOW = 0x2,
IO_REG_IN1_HIGH = 0x3,
@@ -34,26 +35,29 @@ typedef enum _K573_IOChipRegister {
} K573_IOChipRegister;
typedef enum _K573_IOBoardRegister {
- ANALOG_IO_REG_LIGHTS0 = 0x40,
- ANALOG_IO_REG_LIGHTS1 = 0x44,
- ANALOG_IO_REG_LIGHTS2 = 0x48,
- ANALOG_IO_REG_LIGHTS3 = 0x4c,
+ ANALOG_IO_REG_LIGHTS0 = 0x40,
+ ANALOG_IO_REG_LIGHTS1 = 0x44,
+ ANALOG_IO_REG_LIGHTS2 = 0x48,
+ ANALOG_IO_REG_LIGHTS3 = 0x4c,
// The digital I/O board has a lot more registers than these, but there
// seems to be no DIGITAL_IO_LIGHTS6 register. WTF
- DIGITAL_IO_REG_LIGHTS1 = 0x70,
- DIGITAL_IO_REG_LIGHTS0 = 0x71,
- DIGITAL_IO_REG_LIGHTS3 = 0x72,
- DIGITAL_IO_REG_LIGHTS7 = 0x73,
- DIGITAL_IO_REG_LIGHTS4 = 0x7d,
- DIGITAL_IO_REG_LIGHTS5 = 0x7e,
- DIGITAL_IO_REG_LIGHTS2 = 0x7f,
-
- FISHBAIT_IO_REG_UNKNOWN = 0x08,
- FISHBAIT_IO_REG_MOTOR = 0x40,
- FISHBAIT_IO_REG_BRAKE = 0x44,
- FISHBAIT_IO_REG_ENCODER = 0x4c,
- FISHBAIT_IO_REG_RESET_Y = 0x50
+ DIGITAL_IO_REG_LIGHTS1 = 0x70,
+ DIGITAL_IO_REG_LIGHTS0 = 0x71,
+ DIGITAL_IO_REG_LIGHTS3 = 0x72,
+ DIGITAL_IO_REG_LIGHTS7 = 0x73,
+ DIGITAL_IO_REG_DS2401 = 0x77,
+ DIGITAL_IO_REG_FPGA_STATUS = 0x7b,
+ DIGITAL_IO_REG_FPGA_UPLOAD = 0x7c,
+ DIGITAL_IO_REG_LIGHTS4 = 0x7d,
+ DIGITAL_IO_REG_LIGHTS5 = 0x7e,
+ DIGITAL_IO_REG_LIGHTS2 = 0x7f,
+
+ FISHBAIT_IO_REG_UNKNOWN = 0x08,
+ FISHBAIT_IO_REG_MOTOR = 0x40,
+ FISHBAIT_IO_REG_BRAKE = 0x44,
+ FISHBAIT_IO_REG_ENCODER = 0x4c,
+ FISHBAIT_IO_REG_RESET_Y = 0x50
} K573_IOBoardRegister;
// The 573's real-time clock chip is an M48T58, which behaves like a standard