From 92338026f6e406ff4216a84e6f165670078e2bde Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 27 Jul 2016 21:16:19 +0800 Subject: [PATCH] runtime: RTIO_DDS_COUNT -> CONFIG_RTIO_DDS_COUNT --- artiq/runtime/bridge.c | 6 +++--- artiq/runtime/dds.c | 4 ++-- artiq/runtime/dds.h | 4 ++-- artiq/runtime/ksupport.c | 2 +- artiq/runtime/moninj.c | 4 ++-- artiq/runtime/test_mode.c | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/artiq/runtime/bridge.c b/artiq/runtime/bridge.c index 8d90864a1..e5b40fefa 100644 --- a/artiq/runtime/bridge.c +++ b/artiq/runtime/bridge.c @@ -18,7 +18,7 @@ static void rtio_output_blind(int channel, int addr, int data) rtio_o_we_write(1); } -#if ((defined RTIO_DDS_COUNT) && (RTIO_DDS_COUNT > 0)) +#if ((defined CONFIG_RTIO_DDS_COUNT) && (CONFIG_RTIO_DDS_COUNT > 0)) static void dds_write(int bus_channel, int addr, int data) { rtio_output_blind(bus_channel, addr, data); @@ -75,7 +75,7 @@ void bridge_main(void) mailbox_acknowledge(); break; } -#if ((defined RTIO_DDS_COUNT) && (RTIO_DDS_COUNT > 0)) +#if ((defined CONFIG_RTIO_DDS_COUNT) && (CONFIG_RTIO_DDS_COUNT > 0)) case MESSAGE_TYPE_BRG_DDS_SEL: { struct msg_brg_dds_sel *msg; @@ -122,7 +122,7 @@ void bridge_main(void) mailbox_acknowledge(); break; } -#endif /* RTIO_DDS_COUNT */ +#endif /* CONFIG_RTIO_DDS_COUNT */ default: mailbox_acknowledge(); break; diff --git a/artiq/runtime/dds.c b/artiq/runtime/dds.c index 586243f4b..44661658c 100644 --- a/artiq/runtime/dds.c +++ b/artiq/runtime/dds.c @@ -1,6 +1,6 @@ #include -#if ((defined RTIO_DDS_COUNT) && (RTIO_DDS_COUNT > 0)) +#if ((defined CONFIG_RTIO_DDS_COUNT) && (CONFIG_RTIO_DDS_COUNT > 0)) #include @@ -225,4 +225,4 @@ void dds_set(long long int timestamp, int bus_channel, int channel, } } -#endif /* RTIO_DDS_COUNT */ +#endif /* CONFIG_RTIO_DDS_COUNT */ diff --git a/artiq/runtime/dds.h b/artiq/runtime/dds.h index 0a2a8ade4..189d9ada7 100644 --- a/artiq/runtime/dds.h +++ b/artiq/runtime/dds.h @@ -5,7 +5,7 @@ #include #include -#if ((defined RTIO_DDS_COUNT) && (RTIO_DDS_COUNT > 0)) +#if ((defined CONFIG_RTIO_DDS_COUNT) && (CONFIG_RTIO_DDS_COUNT > 0)) /* Maximum number of commands in a batch */ #define DDS_MAX_BATCH 16 @@ -62,6 +62,6 @@ void dds_batch_exit(void); void dds_set(long long int timestamp, int bus_channel, int channel, unsigned int ftw, unsigned int pow, int phase_mode, unsigned int amplitude); -#endif /* RTIO_DDS_COUNT */ +#endif /* CONFIG_RTIO_DDS_COUNT */ #endif /* __DDS_H */ diff --git a/artiq/runtime/ksupport.c b/artiq/runtime/ksupport.c index 475145bfc..b881b4f04 100644 --- a/artiq/runtime/ksupport.c +++ b/artiq/runtime/ksupport.c @@ -119,7 +119,7 @@ static const struct symbol runtime_exports[] = { {"rtio_input_timestamp", &rtio_input_timestamp}, {"rtio_input_data", &rtio_input_data}, -#if ((defined RTIO_DDS_COUNT) && (RTIO_DDS_COUNT > 0)) +#if ((defined CONFIG_RTIO_DDS_COUNT) && (CONFIG_RTIO_DDS_COUNT > 0)) {"dds_init", &dds_init}, {"dds_batch_enter", &dds_batch_enter}, {"dds_batch_exit", &dds_batch_exit}, diff --git a/artiq/runtime/moninj.c b/artiq/runtime/moninj.c index 9ad4ea79c..67116626f 100644 --- a/artiq/runtime/moninj.c +++ b/artiq/runtime/moninj.c @@ -38,7 +38,7 @@ struct monitor_reply { long long int ttl_overrides; unsigned short int dds_rtio_first_channel; unsigned short int dds_channels_per_bus; -#if ((defined RTIO_DDS_COUNT) && (RTIO_DDS_COUNT > 0)) +#if ((defined CONFIG_RTIO_DDS_COUNT) && (CONFIG_RTIO_DDS_COUNT > 0)) unsigned int dds_ftws[CONFIG_RTIO_DDS_COUNT*CONFIG_DDS_CHANNELS_PER_BUS]; #endif } __attribute__((packed)); @@ -68,7 +68,7 @@ static void moninj_monitor(const ip_addr_t *addr, u16_t port) reply.ttl_overrides |= 1LL << i; } -#if ((defined RTIO_DDS_COUNT) && (RTIO_DDS_COUNT > 0)) +#if ((defined CONFIG_RTIO_DDS_COUNT) && (CONFIG_RTIO_DDS_COUNT > 0)) int j; reply.dds_rtio_first_channel = CONFIG_RTIO_FIRST_DDS_CHANNEL; diff --git a/artiq/runtime/test_mode.c b/artiq/runtime/test_mode.c index fe826fca6..38f9c5dcb 100644 --- a/artiq/runtime/test_mode.c +++ b/artiq/runtime/test_mode.c @@ -108,7 +108,7 @@ static void ttlo(char *n, char *value) brg_ttlo(n2, value2); } -#if ((defined RTIO_DDS_COUNT) && (RTIO_DDS_COUNT > 0)) +#if ((defined CONFIG_RTIO_DDS_COUNT) && (CONFIG_RTIO_DDS_COUNT > 0)) static int bus_channel = CONFIG_RTIO_FIRST_DDS_CHANNEL; @@ -362,7 +362,7 @@ static void ddstest(char *n, char *channel) do_ddstest_one(j); } } -#endif /* RTIO_DDS_COUNT */ +#endif /* CONFIG_RTIO_DDS_COUNT */ #if (defined CSR_SPIFLASH_BASE && defined CONFIG_SPIFLASH_PAGE_SIZE) static void fsread(char *key) @@ -662,7 +662,7 @@ static void do_command(char *c) else if(strcmp(token, "ttloe") == 0) ttloe(get_token(&c), get_token(&c)); else if(strcmp(token, "ttlo") == 0) ttlo(get_token(&c), get_token(&c)); -#if ((defined RTIO_DDS_COUNT) && (RTIO_DDS_COUNT > 0)) +#if ((defined CONFIG_RTIO_DDS_COUNT) && (CONFIG_RTIO_DDS_COUNT > 0)) else if(strcmp(token, "ddsbus") == 0) ddsbus(get_token(&c)); else if(strcmp(token, "ddssel") == 0) ddssel(get_token(&c)); else if(strcmp(token, "ddsw") == 0) ddsw(get_token(&c), get_token(&c));