forked from M-Labs/artiq
1
0
Fork 0

runtime: fix test mode on UP

This commit is contained in:
Sebastien Bourdeauducq 2015-04-18 15:30:46 +08:00
parent 60baed68b4
commit b972abd142
1 changed files with 6 additions and 5 deletions

View File

@ -7,9 +7,8 @@
#include <generated/csr.h> #include <generated/csr.h>
#include <console.h> #include <console.h>
#include "test_mode.h"
#include "rtio.h"
#include "dds.h" #include "dds.h"
#include "test_mode.h"
#ifdef ARTIQ_AMP #ifdef ARTIQ_AMP
@ -105,16 +104,18 @@ static void p_ddsfud(void)
#else /* ARTIQ_AMP */ #else /* ARTIQ_AMP */
#include "rtio.h"
static void p_ttlout(int n, int value) static void p_ttlout(int n, int value)
{ {
rtio_init(); rtio_init();
rtio_set_oe(rtio_get_counter() + 8000, n2, 1); rtio_set_oe(rtio_get_counter() + 8000, n, 1);
rtio_set_o(rtio_get_counter() + 8000, n2, value2); rtio_set_o(rtio_get_counter() + 8000, n, value);
} }
static void p_ddssel(int channel) static void p_ddssel(int channel)
{ {
DDS_WRITE(DDS_GPIO, n2); DDS_WRITE(DDS_GPIO, channel);
} }
static void p_ddsreset(void) static void p_ddsreset(void)