diff options
Diffstat (limited to 'firmware/microblaze/lib')
-rw-r--r-- | firmware/microblaze/lib/net_common.c | 11 | ||||
-rw-r--r-- | firmware/microblaze/lib/pic.c | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/firmware/microblaze/lib/net_common.c b/firmware/microblaze/lib/net_common.c index 6c9509c92..0efb26639 100644 --- a/firmware/microblaze/lib/net_common.c +++ b/firmware/microblaze/lib/net_common.c @@ -291,8 +291,17 @@ handle_icmp_packet(struct ip_addr src, struct ip_addr dst, { switch (icmp->type){ case ICMP_DUR: // Destinatino Unreachable - //stop_streaming(); //FIXME if (icmp->code == ICMP_DUR_PORT){ // port unreachable + //handle destination port unreachable (the host ctrl+c'd the app): + + //end async update packets per second + sr_tx_ctrl->cyc_per_up = 0; + + //the end continuous streaming command + sr_rx_ctrl->cmd = (1 << 31) | 1; //one sample, asap + sr_rx_ctrl->time_secs = 0; + sr_rx_ctrl->time_ticks = 0; //latch the command + //struct udp_hdr *udp = (struct udp_hdr *)((char *)icmp + 28); //printf("icmp port unr %d\n", udp->dest); putchar('i'); diff --git a/firmware/microblaze/lib/pic.c b/firmware/microblaze/lib/pic.c index e89d2b755..226da5f85 100644 --- a/firmware/microblaze/lib/pic.c +++ b/firmware/microblaze/lib/pic.c @@ -44,7 +44,7 @@ pic_init(void) // uP is level triggered pic_regs->mask = ~0; // mask all interrupts - pic_regs->edge_enable = PIC_ONETIME_INT; + pic_regs->edge_enable = PIC_ONETIME_INT | PIC_UNDERRUN_INT | PIC_OVERRUN_INT | PIC_PPS_INT; pic_regs->polarity = ~0 & ~PIC_PHY_INT; // rising edge pic_regs->pending = ~0; // clear all pending ints } |