mibuild/sim/server_tb: use SERIAL_SINK_ACK
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 3 Mar 2015 23:55:35 +0000 (00:55 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 3 Mar 2015 23:55:35 +0000 (00:55 +0100)
mibuild/sim/server_tb.cpp

index 9e7139d7e9d8dcca28bd721891c7de609a9cada2..f93e2962cbb372d4ef1a90917776f53eef871490 100644 (file)
@@ -137,8 +137,8 @@ int console_service(struct sim *s)
        /* console --> fpga */
        SERIAL_SINK_STB = s->rx_serial_stb;
        SERIAL_SINK_DATA = s->rx_serial_data;
-       if (s->rx_serial_stb)
-               s->rx_serial_presented = 1;
+       if (SERIAL_SINK_STB & SERIAL_SINK_ACK)
+               s->rx_serial_presented = s->rx_serial_stb;
 
        return 0;
 }