diff options
author | Josh Blum <josh@joshknows.com> | 2011-02-17 13:58:27 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-02-17 13:58:27 -0800 |
commit | c73165bb1d6ec6c714426584e3b1ef15e2e87cb4 (patch) | |
tree | 09c7cc4b5684b2d8dca789c10346c39de9c3f2f4 /firmware/zpu/lib/net_common.c | |
parent | c88166d65651bb98fc182ae600a6649120c601b5 (diff) | |
download | uhd-c73165bb1d6ec6c714426584e3b1ef15e2e87cb4.tar.gz uhd-c73165bb1d6ec6c714426584e3b1ef15e2e87cb4.tar.bz2 uhd-c73165bb1d6ec6c714426584e3b1ef15e2e87cb4.zip |
usrp2: added 2nd dsp support to firmware for 2 and N series
Diffstat (limited to 'firmware/zpu/lib/net_common.c')
-rw-r--r-- | firmware/zpu/lib/net_common.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/firmware/zpu/lib/net_common.c b/firmware/zpu/lib/net_common.c index abf26deb6..6a0fd254b 100644 --- a/firmware/zpu/lib/net_common.c +++ b/firmware/zpu/lib/net_common.c @@ -41,7 +41,7 @@ static const bool debug = false; static const eth_mac_addr_t BCAST_MAC_ADDR = {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}}; //used in the top level application... -struct socket_address fp_socket_src, fp_socket_dst; +uint16_t dsp0_dst_port, err0_dst_port, dsp1_dst_port; // ------------------------------------------------------------------------ @@ -276,15 +276,24 @@ handle_icmp_packet(struct ip_addr src, struct ip_addr dst, //filter out non udp data response struct ip_hdr *ip = (struct ip_hdr *)(((uint8_t*)icmp) + sizeof(struct icmp_echo_hdr)); struct udp_hdr *udp = (struct udp_hdr *)(((char *)ip) + IP_HLEN); - if (IPH_PROTO(ip) != IP_PROTO_UDP || udp->dest != fp_socket_dst.port) return; - - //end async update packets per second - sr_tx_ctrl->cyc_per_up = 0; - - //the end continuous streaming command - sr_rx_ctrl0->cmd = 1 << 31; //no samples now - sr_rx_ctrl0->time_secs = 0; - sr_rx_ctrl0->time_ticks = 0; //latch the command + if (IPH_PROTO(ip) != IP_PROTO_UDP) break; + + if (udp->dest == dsp0_dst_port){ + //the end continuous streaming command + sr_rx_ctrl0->cmd = 1 << 31; //no samples now + sr_rx_ctrl0->time_secs = 0; + sr_rx_ctrl0->time_ticks = 0; //latch the command + } + else if (udp->dest == dsp1_dst_port){ + //the end continuous streaming command + sr_rx_ctrl1->cmd = 1 << 31; //no samples now + sr_rx_ctrl1->time_secs = 0; + sr_rx_ctrl1->time_ticks = 0; //latch the command + } + else if (udp->dest == err0_dst_port){ + //end async update packets per second + sr_tx_ctrl->cyc_per_up = 0; + } //struct udp_hdr *udp = (struct udp_hdr *)((char *)icmp + 28); //printf("icmp port unr %d\n", udp->dest); |