int show_interface_detail_msg(struct imsg *imsg) { struct ctl_iface *iface; switch (imsg->hdr.type) { case IMSG_CTL_SHOW_INTERFACE: iface = imsg->data; printf("\n"); printf("Interface %s, line protocol is %s\n", iface->name, print_link(iface->flags)); printf(" Internet address %s Area %s\n", log_in6addr(&iface->addr), inet_ntoa(iface->area)); printf(" Link type %s, state %s", get_media_descr(get_ifms_type(iface->if_type)), get_linkstate(iface->if_type, iface->linkstate)); if (iface->linkstate != LINK_STATE_DOWN && iface->baudrate > 0) { printf(", "); print_baudrate(iface->baudrate); } printf("\n"); printf(" Router ID %s, network type %s, cost: %d\n", inet_ntoa(iface->rtr_id), if_type_name(iface->type), iface->metric); printf(" Transmit delay is %d sec(s), state %s, priority %d\n", iface->transmit_delay, if_state_name(iface->state), iface->priority); printf(" Designated Router (ID) %s\n", inet_ntoa(iface->dr_id)); printf(" Interface address %s\n", log_in6addr(&iface->dr_addr)); printf(" Backup Designated Router (ID) %s\n", inet_ntoa(iface->bdr_id)); printf(" Interface address %s\n", log_in6addr(&iface->bdr_addr)); printf(" Timer intervals configured, " "hello %d, dead %d, wait %d, retransmit %d\n", iface->hello_interval, iface->dead_interval, iface->dead_interval, iface->rxmt_interval); if (iface->passive) printf(" Passive interface (No Hellos)\n"); else if (iface->hello_timer < 0) printf(" Hello timer not running\n"); else printf(" Hello timer due in %s\n", fmt_timeframe_core(iface->hello_timer)); printf(" Uptime %s\n", fmt_timeframe_core(iface->uptime)); printf(" Neighbor count is %d, adjacent neighbor count is " "%d\n", iface->nbr_cnt, iface->adj_cnt); break; case IMSG_CTL_END: printf("\n"); return (1); default: break; } return (0); }
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; print_bi_mem(bd); print_bi_flash(bd); #if defined(CONFIG_SYS_INIT_RAM_ADDR) print_num("sramstart", (ulong)bd->bi_sramstart); print_num("sramsize", (ulong)bd->bi_sramsize); #endif #if defined(CONFIG_SYS_MBAR) print_num("mbar", bd->bi_mbar_base); #endif print_mhz("cpufreq", bd->bi_intfreq); print_mhz("busfreq", bd->bi_busfreq); #ifdef CONFIG_PCI print_mhz("pcifreq", bd->bi_pcifreq); #endif #ifdef CONFIG_EXTRA_CLOCK print_mhz("flbfreq", bd->bi_flbfreq); print_mhz("inpfreq", bd->bi_inpfreq); print_mhz("vcofreq", bd->bi_vcofreq); #endif print_eth_ip_addr(); print_baudrate(); return 0; }
int show_fib_interface_msg(struct imsg *imsg) { struct kif *k; int ifms_type; switch (imsg->hdr.type) { case IMSG_CTL_IFINFO: k = imsg->data; printf("%-15s", k->ifname); printf("%-15s", k->flags & IFF_UP ? "UP" : ""); ifms_type = get_ifms_type(k->media_type); if (ifms_type) printf("%s, ", get_media_descr(ifms_type)); printf("%s", get_linkstate(k->media_type, k->link_state)); if (k->link_state != LINK_STATE_DOWN && k->baudrate > 0) { printf(", "); print_baudrate(k->baudrate); } printf("\n"); break; case IMSG_CTL_END: printf("\n"); return (1); default: break; } return (0); }
static inline void __maybe_unused print_std_bdinfo(const bd_t *bd) { print_bi_boot_params(bd); print_bi_mem(bd); print_bi_flash(bd); print_eth_ip_addr(); print_baudrate(); }
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; print_bi_mem(bd); print_eth_ip_addr(); print_baudrate(); return 0; }
static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; print_num("arch_number", bd->bi_arch_number); print_bi_boot_params(bd); print_bi_dram(bd); #ifdef CONFIG_SYS_MEM_RESERVE_SECURE if (gd->arch.secure_ram & MEM_RESERVE_SECURE_SECURED) { print_num("Secure ram", gd->arch.secure_ram & MEM_RESERVE_SECURE_ADDR_MASK); } #endif #ifdef CONFIG_RESV_RAM if (gd->arch.resv_ram) print_num("Reserved ram", gd->arch.resv_ram); #endif #if defined(CONFIG_CMD_NET) && !defined(CONFIG_DM_ETH) print_eths(); #endif print_baudrate(); #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) print_num("TLB addr", gd->arch.tlb_addr); #endif print_num("relocaddr", gd->relocaddr); print_num("reloc off", gd->reloc_off); print_num("irq_sp", gd->irq_sp); /* irq stack pointer */ print_num("sp start ", gd->start_addr_sp); #if defined(CONFIG_LCD) || defined(CONFIG_VIDEO) print_num("FB base ", gd->fb_base); #endif /* * TODO: Currently only support for davinci SOC's is added. * Remove this check once all the board implement this. */ #ifdef CONFIG_CLOCKS printf("ARM frequency = %ld MHz\n", gd->bd->bi_arm_freq); printf("DSP frequency = %ld MHz\n", gd->bd->bi_dsp_freq); printf("DDR frequency = %ld MHz\n", gd->bd->bi_ddr_freq); #endif #ifdef CONFIG_BOARD_TYPES printf("Board Type = %ld\n", gd->board_type); #endif #if CONFIG_VAL(SYS_MALLOC_F_LEN) printf("Early malloc usage: %lx / %x\n", gd->malloc_ptr, CONFIG_VAL(SYS_MALLOC_F_LEN)); #endif if (gd->fdt_blob) print_num("fdt_blob", (ulong)gd->fdt_blob); return 0; }
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; print_num("arch_number", bd->bi_arch_number); print_bi_boot_params(bd); print_bi_dram(bd); print_eth_ip_addr(); print_baudrate(); return 0; }
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; print_bi_boot_params(bd); print_bi_dram(bd); print_num("relocaddr", gd->relocaddr); print_num("reloc off", gd->reloc_off); print_eth_ip_addr(); print_baudrate(); return 0; }
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; print_bi_dram(bd); print_bi_flash(bd); #if defined(CONFIG_SYS_SRAM_BASE) print_num ("sram start", (ulong)bd->bi_sramstart); print_num ("sram size", (ulong)bd->bi_sramsize); #endif print_eth_ip_addr(); print_baudrate(); return 0; }
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; print_bi_boot_params(bd); print_bi_dram(bd); print_num("relocaddr", gd->relocaddr); print_num("reloc off", gd->reloc_off); #if defined(CONFIG_CMD_NET) print_eth_ip_addr(); print_mhz("ethspeed", bd->bi_ethspeed); #endif print_baudrate(); return 0; }
void next_baudrate( xbee_serial_t *port) { uint32_t rates[] = { 9600, 19200, 38400, 57600, 115200 }; int i; for (i = 0; i < _TABLE_ENTRIES( rates); ++i) { if (port->baudrate == rates[i]) { ++i; break; } } // At end of loop, if port was using a rate not in the list above, // the code will end up setting the baudrate to 9600. xbee_ser_baudrate( port, rates[i % _TABLE_ENTRIES( rates)]); print_baudrate( port); }
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; #ifdef DEBUG print_num("bd address", (ulong)bd); #endif print_bi_mem(bd); print_bi_flash(bd); print_num("sramstart", bd->bi_sramstart); print_num("sramsize", bd->bi_sramsize); #if defined(CONFIG_MPC8xx) || defined(CONFIG_E500) print_num("immr_base", bd->bi_immr_base); #endif print_num("bootflags", bd->bi_bootflags); #if defined(CONFIG_CPM2) print_mhz("vco", bd->bi_vco); print_mhz("sccfreq", bd->bi_sccfreq); print_mhz("brgfreq", bd->bi_brgfreq); #endif print_mhz("intfreq", bd->bi_intfreq); #if defined(CONFIG_CPM2) print_mhz("cpmfreq", bd->bi_cpmfreq); #endif print_mhz("busfreq", bd->bi_busfreq); #ifdef CONFIG_ENABLE_36BIT_PHYS #ifdef CONFIG_PHYS_64BIT puts("addressing = 36-bit\n"); #else puts("addressing = 32-bit\n"); #endif #endif print_eth_ip_addr(); print_baudrate(); print_num("relocaddr", gd->relocaddr); board_detail(); return 0; }
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; print_bi_dram(bd); print_bi_flash(bd); #if defined(CONFIG_SYS_SRAM_BASE) print_num("sram start ", (ulong)bd->bi_sramstart); print_num("sram size ", (ulong)bd->bi_sramsize); #endif #if defined(CONFIG_CMD_NET) && !defined(CONFIG_DM_ETH) print_eths(); #endif print_baudrate(); print_num("relocaddr", gd->relocaddr); print_num("reloc off", gd->reloc_off); print_num("fdt_blob", (ulong)gd->fdt_blob); print_num("new_fdt", (ulong)gd->new_fdt); print_num("fdt_size", (ulong)gd->fdt_size); return 0; }
void xbee_term( xbee_serial_t *port) { int ch, retval; char buffer[40]; // set up the console for nonblocking xbee_term_console_init(); puts( "Simple XBee Terminal"); puts( "CTRL-X to EXIT, CTRL-K toggles break, CTRL-R toggles RTS, " "TAB changes bps."); print_baudrate( port); set_rts( port, RTS_ASSERT); check_cts( port); puts( ""); for (;;) { check_cts( port); ch = xbee_term_getchar(); if (ch == CTRL('X')) { break; // exit terminal } else if (ch == CTRL('R')) { set_rts( port, RTS_TOGGLE); } else if (ch == CTRL('K')) { set_break( port, BREAK_TOGGLE); } else if (ch == CTRL('I')) // tab { next_baudrate( port); } else if (ch > 0) { // Pass all characters out serial port, converting LF to CR // since XBee expects CR for line endings. xbee_ser_putchar( port, ch == '\n' ? '\r' : ch); // Only print printable characters or CR, LF or backspace to stdout. if (isprint( ch) || ch == '\r' || ch == '\n' || ch == '\b') { set_color( SOURCE_KEYBOARD); // stdout expects LF for line endings putchar( ch == '\r' ? '\n' : ch); fflush( stdout); } } retval = xbee_ser_read( port, buffer, sizeof buffer); if (retval > 0) { dump_serial_data( buffer, retval); } } xbee_term_console_restore(); puts( ""); }