2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

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 "messages.h"
#include "rtio.h"
#include "ttl.h"
#include "dds.h"
#include "bridge.h"
@ -58,7 +59,7 @@ void bridge_main(void)
struct msg_brg_ttl_out *msg;
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();
break;
}
@ -66,7 +67,7 @@ void bridge_main(void)
struct msg_brg_ttl_out *msg;
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();
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 */