runtime: define constants for ttl addresses

This commit is contained in:
Robert Jördens 2016-03-01 18:22:42 +01:00
parent 3aebbbdb61
commit 135643e3a6
2 changed files with 11 additions and 2 deletions

View File

@ -1,6 +1,7 @@
#include "mailbox.h" #include "mailbox.h"
#include "messages.h" #include "messages.h"
#include "rtio.h" #include "rtio.h"
#include "ttl.h"
#include "dds.h" #include "dds.h"
#include "bridge.h" #include "bridge.h"
@ -58,7 +59,7 @@ void bridge_main(void)
struct msg_brg_ttl_out *msg; struct msg_brg_ttl_out *msg;
msg = (struct msg_brg_ttl_out *)umsg; msg = (struct msg_brg_ttl_out *)umsg;
rtio_output_blind(msg->channel, 1, msg->value); rtio_output_blind(msg->channel, TTL_O_ADDR, msg->value);
mailbox_acknowledge(); mailbox_acknowledge();
break; break;
} }
@ -66,7 +67,7 @@ void bridge_main(void)
struct msg_brg_ttl_out *msg; struct msg_brg_ttl_out *msg;
msg = (struct msg_brg_ttl_out *)umsg; msg = (struct msg_brg_ttl_out *)umsg;
rtio_output_blind(msg->channel, 0, msg->value); rtio_output_blind(msg->channel, TTL_OE_ADDR, msg->value);
mailbox_acknowledge(); mailbox_acknowledge();
break; break;
} }

8
artiq/runtime/ttl.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef __TTL_H
#define __TTL_H
#define TTL_O_ADDR 0
#define TTL_OE_ADDR 1
#define TTL_SENSITIVITY_ADDR 2
#endif /* __TTL_H */