cortexelf-v1: Fetch data at TPB rising when MWR or MRD are low
authorKeith Packard <keithp@keithp.com>
Fri, 14 Apr 2017 03:18:58 +0000 (21:18 -0600)
committerKeith Packard <keithp@keithp.com>
Fri, 14 Apr 2017 03:20:13 +0000 (21:20 -0600)
This should get the right value at least.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/cortexelf-v1/ao_1802.c

index b7e11637ab9dbf9eeef4a80d5da106a86808c93f..9fb36595d3797376d32b06b042eb0e8f1f361936 100644 (file)
@@ -73,14 +73,14 @@ static void
 TPB_rising(void)
 {
        ADDRESS = (ADDRESS & 0xff00) | MA();
+       if (MWR() == 0 || MRD() == 0)
+               DATA = BUS();
        ao_wakeup(&ADDRESS);
 }
 
 static void
 TPB_falling(void)
 {
-       DATA = BUS();
-       ao_wakeup(&ADDRESS);
 }
 
 uint8_t