[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r8936 - in usrp2/trunk/firmware: apps lib
From: |
eb |
Subject: |
[Commit-gnuradio] r8936 - in usrp2/trunk/firmware: apps lib |
Date: |
Fri, 18 Jul 2008 11:38:15 -0600 (MDT) |
Author: eb
Date: 2008-07-18 11:38:14 -0600 (Fri, 18 Jul 2008)
New Revision: 8936
Added:
usrp2/trunk/firmware/apps/echo.c
Modified:
usrp2/trunk/firmware/apps/
usrp2/trunk/firmware/apps/Makefile.am
usrp2/trunk/firmware/lib/hal_io.c
usrp2/trunk/firmware/lib/stdio.h
Log:
code to exercise uart i/o
Property changes on: usrp2/trunk/firmware/apps
___________________________________________________________________
Name: svn:ignore
- *-stamp
*.a
*.bin
*.dump
*.log
*.rom
*.map
.deps
Makefile
Makefile.in
aclocal.m4
autom4te.cache
blink_leds
blink_leds2
build
compile
config.h
config.h.in
config.log
config.status
configure
depcomp
eth_test
gen_eth_packets
ibs_rx_test
ibs_tx_test
install-sh
libtool
ltmain.sh
missing
py-compile
rcv_eth_packets
run_tests.sh
stamp-h1
test1
test_phy_comm
timer_test
buf_ram_test
buf_ram_zero
hello
test_printf
test_spi
test_i2c
gen_pause_frames
test_serdes
rx_only
tx_only
tx_standalone
tx_drop
tx_drop2
tx_drop_rate_limited
test_lsdac
test_lsadc
read_dbids
test_db_spi
ramp_lsdac
eth_to_serdes
serdes_to_dsp
sd_gentest
sd_bounce
can_i_sub
tx_only_v2
rx_only_v2
txrx
+ *-stamp
*.a
*.bin
*.dump
*.log
*.rom
*.map
.deps
Makefile
Makefile.in
aclocal.m4
autom4te.cache
blink_leds
blink_leds2
build
compile
config.h
config.h.in
config.log
config.status
configure
depcomp
echo
eth_test
gen_eth_packets
ibs_rx_test
ibs_tx_test
install-sh
libtool
ltmain.sh
missing
py-compile
rcv_eth_packets
run_tests.sh
stamp-h1
test1
test_phy_comm
timer_test
buf_ram_test
buf_ram_zero
hello
test_printf
test_spi
test_i2c
gen_pause_frames
test_serdes
rx_only
tx_only
tx_standalone
tx_drop
tx_drop2
tx_drop_rate_limited
test_lsdac
test_lsadc
read_dbids
test_db_spi
ramp_lsdac
eth_to_serdes
serdes_to_dsp
sd_gentest
sd_bounce
can_i_sub
tx_only_v2
rx_only_v2
txrx
Modified: usrp2/trunk/firmware/apps/Makefile.am
===================================================================
--- usrp2/trunk/firmware/apps/Makefile.am 2008-07-18 16:09:14 UTC (rev
8935)
+++ usrp2/trunk/firmware/apps/Makefile.am 2008-07-18 17:38:14 UTC (rev
8936)
@@ -24,6 +24,7 @@
blink_leds2 \
buf_ram_test \
can_i_sub \
+ echo \
gen_eth_packets \
hello \
ibs_rx_test \
Added: usrp2/trunk/firmware/apps/echo.c
===================================================================
--- usrp2/trunk/firmware/apps/echo.c (rev 0)
+++ usrp2/trunk/firmware/apps/echo.c 2008-07-18 17:38:14 UTC (rev 8936)
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This program 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 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "u2_init.h"
+#include "stdio.h"
+
+int
+main(void)
+{
+ u2_init();
+
+ puts("\n>>> echo <<<");
+
+ while (1){
+ int ch = getchar();
+ putchar(ch);
+ }
+
+ return 0;
+}
Property changes on: usrp2/trunk/firmware/apps/echo.c
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: usrp2/trunk/firmware/lib/hal_io.c
===================================================================
--- usrp2/trunk/firmware/lib/hal_io.c 2008-07-18 16:09:14 UTC (rev 8935)
+++ usrp2/trunk/firmware/lib/hal_io.c 2008-07-18 17:38:14 UTC (rev 8936)
@@ -247,6 +247,12 @@
return ch;
}
+int
+getchar(void)
+{
+ return hal_uart_getc();
+}
+
#else // nop all i/o
void
@@ -266,6 +272,12 @@
return ch;
}
+int
+getchar(void)
+{
+ return EOF;
+}
+
#endif
// ================================================================
Modified: usrp2/trunk/firmware/lib/stdio.h
===================================================================
--- usrp2/trunk/firmware/lib/stdio.h 2008-07-18 16:09:14 UTC (rev 8935)
+++ usrp2/trunk/firmware/lib/stdio.h 2008-07-18 17:38:14 UTC (rev 8936)
@@ -33,6 +33,6 @@
int puts(const char *s);
int printf(const char *format, ...);
-// int getchar(void);
+int getchar(void);
#endif /* INCLUDED_STDIO_H */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r8936 - in usrp2/trunk/firmware: apps lib,
eb <=