commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r6747 - gnuradio/branches/developers/matt/u2f/firmware


From: eb
Subject: [Commit-gnuradio] r6747 - gnuradio/branches/developers/matt/u2f/firmware
Date: Tue, 30 Oct 2007 15:22:05 -0600 (MDT)

Author: eb
Date: 2007-10-30 15:22:05 -0600 (Tue, 30 Oct 2007)
New Revision: 6747

Added:
   gnuradio/branches/developers/matt/u2f/firmware/test_phy_comm.c
Modified:
   gnuradio/branches/developers/matt/u2f/firmware/Makefile
   gnuradio/branches/developers/matt/u2f/firmware/eth_driver.c
Log:
work-in-progress

Modified: gnuradio/branches/developers/matt/u2f/firmware/Makefile
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/Makefile     2007-10-30 
21:05:41 UTC (rev 6746)
+++ gnuradio/branches/developers/matt/u2f/firmware/Makefile     2007-10-30 
21:22:05 UTC (rev 6747)
@@ -22,7 +22,10 @@
 
 .PRECIOUS : %.bin
 
-ROMS = test1.rom eth_test.rom timer_test.rom ibs_tx_test.rom ibs_rx_test.rom
+ROMS = test1.rom eth_test.rom timer_test.rom \
+       ibs_tx_test.rom ibs_rx_test.rom \
+       test_phy_comm.rom
+
 DUMPS = test1.dump eth_test.dump timer_test.dump ibs_tx_test.dump 
ibs_rx_test.dump
 LIBS = libu2fw.a
 
@@ -56,6 +59,9 @@
 ibs_rx_test.exe:  ibs_rx_test.o libu2fw.a
        $(CC) $(LDFLAGS) $^ -o $@
 
+test_phy_comm.exe:  test_phy_comm.o libu2fw.a
+       $(CC) $(LDFLAGS) $^ -o $@
+
 clean:
        rm -f *.a *.o *.bin *.rom *.exe *.dump
 

Modified: gnuradio/branches/developers/matt/u2f/firmware/eth_driver.c
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/eth_driver.c 2007-10-30 
21:05:41 UTC (rev 6746)
+++ gnuradio/branches/developers/matt/u2f/firmware/eth_driver.c 2007-10-30 
21:22:05 UTC (rev 6747)
@@ -171,6 +171,15 @@
   eth_mac_miim_write(PHY_INT_CLEAR, ~0);       // clear all pending interrupts
   eth_mac_miim_write(PHY_INT_MASK, mask);      // enable the ones we want
 
+#if 1
+  unsigned read_back = eth_mac_miim_read(PHY_INT_MASK);
+
+  hal_puts("eth_driver: wr INT_MASK = ");
+  hal_puthex_nl(mask);
+  hal_puts("eth_driver: rd INT_MASK = ");
+  hal_puthex_nl(read_back);
+#endif
+
   pic_register_handler(IRQ_PHY, eth_phy_irq_handler);
 
   // FIXME not sure where we want to make the first check of the link state

Added: gnuradio/branches/developers/matt/u2f/firmware/test_phy_comm.c
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/test_phy_comm.c              
                (rev 0)
+++ gnuradio/branches/developers/matt/u2f/firmware/test_phy_comm.c      
2007-10-30 21:22:05 UTC (rev 6747)
@@ -0,0 +1,43 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+// check communication with ethernet PHY chip
+
+#include "u2_init.h"
+#include "memory_map.h"
+#include "hal_io.h"
+#include "eth_driver.h"
+#include "eth_mac.h"
+
+int
+main(void)
+{
+  u2_init();
+
+  hal_puts("\n\n@@@ test_phy_comm @@@\n\n\n");
+
+  eth_mac_init();
+  eth_driver_init();
+
+  u2_infinite_loop();
+
+  return 0;
+}


Property changes on: 
gnuradio/branches/developers/matt/u2f/firmware/test_phy_comm.c
___________________________________________________________________
Name: svn:eol-style
   + native





reply via email to

[Prev in Thread] Current Thread [Next in Thread]