[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r5526 - gnuradio/branches/developers/eb/u2f/firmware
From: |
eb |
Subject: |
[Commit-gnuradio] r5526 - gnuradio/branches/developers/eb/u2f/firmware |
Date: |
Wed, 23 May 2007 00:08:39 -0600 (MDT) |
Author: eb
Date: 2007-05-23 00:08:38 -0600 (Wed, 23 May 2007)
New Revision: 5526
Added:
gnuradio/branches/developers/eb/u2f/firmware/u2_init.h
Modified:
gnuradio/branches/developers/eb/u2f/firmware/bootstrap.c
gnuradio/branches/developers/eb/u2f/firmware/sim_io.c
Log:
work-in-progress on u2 firmware
Modified: gnuradio/branches/developers/eb/u2f/firmware/bootstrap.c
===================================================================
--- gnuradio/branches/developers/eb/u2f/firmware/bootstrap.c 2007-05-23
05:47:52 UTC (rev 5525)
+++ gnuradio/branches/developers/eb/u2f/firmware/bootstrap.c 2007-05-23
06:08:38 UTC (rev 5526)
@@ -2,21 +2,23 @@
#include "memory_map.h"
#include "spi.h"
#include "sim_io.h"
+#include "u2_init.h"
+/*
+ * We ought to arrange that this is called before main, but for now,
+ * require that the user's main call u2_init as the first thing...
+ */
+int
+main(void)
+{
-int main() {
-
sim_puthex_nl(0);
- sim_putc_nl('X');
- sim_puthex_nl(1);
// Set up AD9510
spi_init();
- sim_puthex_nl(2);
+ sim_puthex_nl(1);
sim_puts("This is a test\n");
- sim_puthex(3);
- sim_newline();
spi_transact(SPI_TXONLY, SPI_SS_AD9510, 0x00004500, 24, 0); // CLK2 drives
distribution
spi_transact(SPI_TXONLY, SPI_SS_AD9510, 0x00003D80, 24, 0); // Turn on
output 1 (FPGA CLK), normal levels
@@ -58,18 +60,19 @@
dsp_regs->scale_q = 123;
// Set up serdes
- //char serdes_controls = (char)(SERDES_ENABLE | SERDES_LOOPEN | SERDES_RXEN);
+ //output_regs->serdes_ctrl = (SERDES_ENABLE | SERDES_LOOPEN | SERDES_RXEN);
output_regs->serdes_ctrl = (SERDES_ENABLE | SERDES_RXEN);
+#if 0
// Set up DAC
int i = 0;
while(1) {
int command = (3 << 19) | (0 << 16) | (i & 0xffff);
spi_transact(SPI_TXONLY, SPI_SS_TX_DAC, command, 24, 1); // negate TX phase
i++;
-
}
+#endif
// Control LEDs
while(1) {
Modified: gnuradio/branches/developers/eb/u2f/firmware/sim_io.c
===================================================================
--- gnuradio/branches/developers/eb/u2f/firmware/sim_io.c 2007-05-23
05:47:52 UTC (rev 5525)
+++ gnuradio/branches/developers/eb/u2f/firmware/sim_io.c 2007-05-23
06:08:38 UTC (rev 5526)
@@ -29,9 +29,6 @@
void sim_puts_nl(const char *s)
{
- while (*s)
- sim_putc(*s++);
-
+ sim_puts(s);
sim_newline();
}
-
Added: gnuradio/branches/developers/eb/u2f/firmware/u2_init.h
===================================================================
--- gnuradio/branches/developers/eb/u2f/firmware/u2_init.h
(rev 0)
+++ gnuradio/branches/developers/eb/u2f/firmware/u2_init.h 2007-05-23
06:08:38 UTC (rev 5526)
@@ -0,0 +1,2 @@
+int u2_init(void);
+
Property changes on: gnuradio/branches/developers/eb/u2f/firmware/u2_init.h
___________________________________________________________________
Name: svn:eol-style
+ native
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r5526 - gnuradio/branches/developers/eb/u2f/firmware,
eb <=