runtime: start RTIO counter at first rtio_set

This commit is contained in:
Sebastien Bourdeauducq 2014-08-18 23:46:58 +08:00
parent 7d8dc4ef30
commit 7a90f4f4ec
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ class LinkInterface:
class Environment(LinkInterface):
def __init__(self, ref_period):
self.ref_period = ref_period
self.initial_time = 8000
self.initial_time = 2000
def emit_object(self):
tm = lt.TargetMachine.new(triple="or1k", cpu="generic")

View File

@ -142,6 +142,7 @@ static void gpio_set(int channel, int value)
static void rtio_set(long long int timestamp, int channel, int value)
{
rtio_reset_write(0);
rtio_chan_sel_write(channel);
rtio_o_timestamp_write(timestamp);
rtio_o_value_write(value);
@ -224,7 +225,6 @@ int main(void)
if(load_elf(syscalls, kbuf, length, kcode, sizeof(kcode))) {
flush_cpu_icache();
dds_init();
rtio_reset_write(0);
k();
rtio_reset_write(1);
send_sync();