这篇教程C++ status_led_set函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中status_led_set函数的典型用法代码示例。如果您正苦于以下问题:C++ status_led_set函数的具体用法?C++ status_led_set怎么用?C++ status_led_set使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了status_led_set函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: board_late_init/* * Miscellaneous platform dependent initialisations */int board_late_init(void){ const unsigned int phy_nrst_gpio = 0; const unsigned int usb_nrst_gpio = 35; int ret; status_led_set(1, STATUS_LED_ON); status_led_set(2, STATUS_LED_ON); /* Address of boot parameters for ATAG (if ATAG is used) */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; ret = gpio_request(phy_nrst_gpio, "phy_nrst_gpio"); if (!ret) gpio_direction_output(phy_nrst_gpio, 1); else printf("Cannot remove PHY from reset!/n"); ret = gpio_request(usb_nrst_gpio, "usb_nrst_gpio"); if (!ret) gpio_direction_output(usb_nrst_gpio, 1); else printf("Cannot remove USB from reset!/n"); mdelay(50); return 0;}
开发者ID:0xFelix,项目名称:u-boot-edminiv2,代码行数:31,
示例2: show_boot_progressvoid show_boot_progress (int status){#if defined(CONFIG_STATUS_LED)# if defined(STATUS_LED_YELLOW) status_led_set (STATUS_LED_YELLOW, (status < 0) ? STATUS_LED_ON : STATUS_LED_OFF);# endif /* STATUS_LED_YELLOW */# if defined(STATUS_LED_BOOT) if (status == 6) status_led_set (STATUS_LED_BOOT, STATUS_LED_OFF);# endif /* STATUS_LED_BOOT */#endif /* CONFIG_STATUS_LED */}
开发者ID:Admetric,项目名称:android_u-boot_s5pv210,代码行数:13,
示例3: misc_init_r/* * Routine: misc_init_r * Description: Configure board specific parts */int misc_init_r(void){ struct tricorder_eeprom eeprom; get_eeprom(&eeprom); print_hwversion(&eeprom); twl4030_power_init(); status_led_set(0, CONFIG_LED_STATUS_ON); status_led_set(1, CONFIG_LED_STATUS_ON); status_led_set(2, CONFIG_LED_STATUS_ON); omap_die_id_display(); return 0;}
开发者ID:SunnyBrother,项目名称:u-boot-at91,代码行数:19,
示例4: bootp_handler/* * Handle a BOOTP received packet. */static void bootp_handler(uchar *pkt, unsigned dest, struct in_addr sip, unsigned src, unsigned len){ struct bootp_hdr *bp; debug("got BOOTP packet (src=%d, dst=%d, len=%d want_len=%zu)/n", src, dest, len, sizeof(struct bootp_hdr)); bp = (struct bootp_hdr *)pkt; /* Filter out pkts we don't want */ if (check_packet(pkt, dest, src, len)) return; /* * Got a good BOOTP reply. Copy the data into our variables. */#ifdef CONFIG_STATUS_LED status_led_set(STATUS_LED_BOOT, STATUS_LED_OFF);#endif store_net_params(bp); /* Store net parameters from reply */ /* Retrieve extended information (we must parse the vendor area) */ if (net_read_u32((u32 *)&bp->bp_vend[0]) == htonl(BOOTP_VENDOR_MAGIC)) bootp_process_vendor((uchar *)&bp->bp_vend[4], len); net_set_timeout_handler(0, (thand_f *)0); bootstage_mark_name(BOOTSTAGE_ID_BOOTP_STOP, "bootp_stop"); debug("Got good BOOTP/n"); net_auto_load();}
开发者ID:LCameron,项目名称:xilinx-uboot,代码行数:37,
示例5: board_init/* * Routine: board_init * Description: Early hardware init. */int board_init(void){ int loops = 100; /* find out flash memory type, assume NAND first */ gpmc_cs0_flash = MTD_DEV_TYPE_NAND; gpmc_init(); /* Issue a RESET and then READID */ writeb(NAND_CMD_RESET, &gpmc_cfg->cs[0].nand_cmd); writeb(NAND_CMD_STATUS, &gpmc_cfg->cs[0].nand_cmd); while ((readl(&gpmc_cfg->cs[0].nand_dat) & NAND_STATUS_READY) != NAND_STATUS_READY) { udelay(1); if (--loops == 0) { gpmc_cs0_flash = MTD_DEV_TYPE_ONENAND; gpmc_init(); /* reinitialize for OneNAND */ break; } } /* boot param addr */ gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE) status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_ON);#endif return 0;}
开发者ID:eballetbo,项目名称:u-boot,代码行数:34,
示例6: board_initint board_init(void){ /* Enable Ctrlc */ console_init_f(); /* arch number of the board */#if defined(CONFIG_CPU9G20) gd->bd->bi_arch_number = MACH_TYPE_CPUAT9G20;#elif defined(CONFIG_CPU9260) gd->bd->bi_arch_number = MACH_TYPE_CPUAT9260;#endif /* adress of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; at91_serial_hw_init();#ifdef CONFIG_CMD_NAND cpu9260_nand_hw_init();#endif#ifdef CONFIG_MACB cpu9260_macb_hw_init();#endif#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) status_led_set(STATUS_LED_BOOT, STATUS_LED_ON);#endif return 0;}
开发者ID:247a,项目名称:lenovo_b6000-8000_kernel_source,代码行数:27,
示例7: BootpHandler/* * Handle a BOOTP received packet. */static voidBootpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src, unsigned len){ struct Bootp_t *bp; debug("got BOOTP packet (src=%d, dst=%d, len=%d want_len=%zu)/n", src, dest, len, sizeof(struct Bootp_t)); bp = (struct Bootp_t *)pkt; /* Filter out pkts we don't want */ if (BootpCheckPkt(pkt, dest, src, len)) return; /* * Got a good BOOTP reply. Copy the data into our variables. */#ifdef CONFIG_STATUS_LED status_led_set(STATUS_LED_BOOT, STATUS_LED_OFF);#endif BootpCopyNetParams(bp); /* Store net parameters from reply */ /* Retrieve extended information (we must parse the vendor area) */ if (NetReadLong((uint *)&bp->bp_vend[0]) == htonl(BOOTP_VENDOR_MAGIC)) BootpVendorProcess((uchar *)&bp->bp_vend[4], len); NetSetTimeout(0, (thand_f *)0); bootstage_mark_name(BOOTSTAGE_ID_BOOTP_STOP, "bootp_stop"); debug("Got good BOOTP/n"); net_auto_load();}
开发者ID:khadas,项目名称:u-boot,代码行数:38,
示例8: initr_status_ledstatic int initr_status_led(void){#if defined(STATUS_LED_BOOT) status_led_set(STATUS_LED_BOOT, STATUS_LED_BLINKING);#else status_led_init();#endif return 0;}
开发者ID:CheezeCake,项目名称:edison-u-boot,代码行数:9,
示例9: show_boot_progressvoid show_boot_progress (int status){ int i,j; if(status > 0) { last_boot_progress = status; } else { /* * If a specific failure code is given, flash this code * else just use the last success code we've seen */ if(status < -1) last_boot_progress = -status; /* * Flash this code 5 times */ for(j=0; j<5; j++) { /* * Houston, we have a problem. * Blink the last OK status which indicates where things failed. */ status_led_set(STATUS_LED_RED, STATUS_LED_ON); flash_code(last_boot_progress, 5, 3); /* * Delay 5 seconds between repetitions, * with the fault LED blinking */ for(i=0; i<5; i++) { status_led_set(STATUS_LED_RED, STATUS_LED_OFF); udelay(500000); status_led_set(STATUS_LED_RED, STATUS_LED_ON); udelay(500000); } } /* * Reset the board to retry initialization. */ do_reset (NULL, 0, 0, NULL); }}
开发者ID:54shady,项目名称:uboot_tiny4412,代码行数:42,
示例10: board_init/* * Basic board specific setup. Pinmux has been handled already. */int board_init(void){ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; gpmc_init();#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) status_led_set(STATUS_LED_BOOT, STATUS_LED_OFF);#endif return 0;}
开发者ID:01hyang,项目名称:u-boot,代码行数:14,
示例11: board_initint board_init(void){ /* Adress of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) status_led_set(STATUS_LED_BOOT, STATUS_LED_STATE);#endif return 0;}
开发者ID:0s4l,项目名称:u-boot-xlnx,代码行数:11,
示例12: BootpHandler/* * Handle a BOOTP received packet. */static voidBootpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len){ Bootp_t *bp; char *s; debug("got BOOTP packet (src=%d, dst=%d, len=%d want_len=%zu)/n", src, dest, len, sizeof (Bootp_t)); bp = (Bootp_t *)pkt; if (BootpCheckPkt(pkt, dest, src, len)) /* Filter out pkts we don't want */ return; /* * Got a good BOOTP reply. Copy the data into our variables. */#ifdef CONFIG_STATUS_LED status_led_set (STATUS_LED_BOOT, STATUS_LED_OFF);#endif BootpCopyNetParams(bp); /* Store net parameters from reply */ /* Retrieve extended information (we must parse the vendor area) */ if (NetReadLong((ulong*)&bp->bp_vend[0]) == htonl(BOOTP_VENDOR_MAGIC)) BootpVendorProcess((uchar *)&bp->bp_vend[4], len); NetSetTimeout(0, (thand_f *)0); debug("Got good BOOTP/n"); if ((s = getenv("autoload")) != NULL) { if (*s == 'n') { /* * Just use BOOTP to configure system; * Do not use TFTP to load the bootfile. */ NetState = NETLOOP_SUCCESS; return;#if defined(CONFIG_CMD_NFS) } else if (strcmp(s, "NFS") == 0) { /* * Use NFS to load the bootfile. */ NfsStart(); return;#endif } } struct NetTask tftp_task; BootpDeriveTaskTftp(&tftp_task, bp); TftpStart(&tftp_task);}
开发者ID:RC-MODULE,项目名称:mboot,代码行数:57,
示例13: board_init/* * Routine: board_init * Description: Early hardware init. */int board_init(void){ gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ /* boot param addr */ gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) status_led_set(STATUS_LED_BOOT, STATUS_LED_ON);#endif return 0;}
开发者ID:CheezeCake,项目名称:edison-u-boot,代码行数:16,
示例14: board_init/* * Routine: board_init * Description: Early hardware init. */int board_init(void){ gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ /* board id for Linux */ gd->bd->bi_arch_number = MACH_TYPE_OMAP3_BEAGLE; /* boot param addr */ gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE) status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_ON);#endif return 0;}
开发者ID:axxia,项目名称:axxia_u-boot,代码行数:18,
示例15: flash_code/* * Show boot status: flash the LED if something goes wrong, indicating * that last thing that worked and thus, by implication, what is broken. * * This stores the last OK value in RAM so this will not work properly * before RAM is initialized. Since it is being used for indicating * boot status (i.e. after RAM is initialized), that is OK. */static void flash_code(uchar number, uchar modulo, uchar digits){ int j; /* * Recursively do upper digits. */ if(digits > 1) { flash_code(number / modulo, modulo, digits - 1); } number = number % modulo; /* * Zero is indicated by one long flash (dash). */ if(number == 0) { status_led_set(STATUS_LED_BOOT, STATUS_LED_ON); udelay(1000000); status_led_set(STATUS_LED_BOOT, STATUS_LED_OFF); udelay(200000); } else { /* * Non-zero is indicated by short flashes, one per count. */ for(j = 0; j < number; j++) { status_led_set(STATUS_LED_BOOT, STATUS_LED_ON); udelay(100000); status_led_set(STATUS_LED_BOOT, STATUS_LED_OFF); udelay(200000); } } /* * Inter-digit pause: we've already waited 200 mSec, wait 1 sec total */ udelay(700000);}
开发者ID:54shady,项目名称:uboot_tiny4412,代码行数:45,
示例16: board_initint board_init(void){ gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ /* boot param addr */ gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE) status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_ON);#endif cm_t3517_musb_init(); return 0;}
开发者ID:OpenNoah,项目名称:u-boot,代码行数:15,
示例17: board_init/* * Routine: board_init * Description: Early hardware init. */int board_init(void){ puts("****User-specific board_init/n"); //hl1sqi gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ /* board id for Linux */ gd->bd->bi_arch_number = MACH_TYPE_OMAP3_BEAGLE; /* boot param addr */ gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) status_led_set (STATUS_LED_BOOT, STATUS_LED_ON);#endif return 0;}
开发者ID:zooliet,项目名称:u-boot,代码行数:20,
示例18: last_stage_initint last_stage_init(void){ int i;#if CONFIG_NETPHONE_VERSION == 2 /* assert peripheral reset */ ((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pcdat &= ~_BW(12); for (i = 0; i < 10; i++) udelay(1000); ((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pcdat |= _BW(12);#endif reset_phys(); /* check in order to enable the local console */ left_to_poll = PHONE_CONSOLE_POLL_HZ; i = CONFIG_SYS_HZ * 2; while (i > 0) { if (tstc()) { getc(); break; } do_poll(); if (drv_phone_use_me()) { status_led_set(0, STATUS_LED_ON); while (!drv_phone_is_idle()) { do_poll(); udelay(1000000 / CONFIG_SYS_HZ); } console_assign(stdin, "phone"); console_assign(stdout, "phone"); console_assign(stderr, "phone"); setenv("bootdelay", "-1"); break; } udelay(1000000 / CONFIG_SYS_HZ); i--; left_to_poll--; } left_to_poll = PHONE_CONSOLE_POLL_HZ; return 0;}
开发者ID:12thmantec,项目名称:u-boot-novena-spl,代码行数:47,
示例19: board_init/* * Routine: board_init * Description: hardware init. */int board_init(void){ gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ /* board id for Linux */ if (get_cpu_family() == CPU_OMAP34XX) gd->bd->bi_arch_number = MACH_TYPE_CM_T35; else gd->bd->bi_arch_number = MACH_TYPE_CM_T3730; /* boot param addr */ gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE) status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_ON);#endif return 0;}
开发者ID:frawang,项目名称:u-boot,代码行数:23,
示例20: board_init/* * Routine: board_init * Description: Early hardware init. */int board_init (void){ u32 *gpmc_config; gpmc_init (); /* in SRAM or SDRAM, finish GPMC */ /* Configure console support on zoom2 */ gpmc_config = gpmc_serial_TL16CP754C; enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[3], SERIAL_TL16CP754C_BASE, GPMC_SIZE_16M); /* board id for Linux */ gd->bd->bi_arch_number = MACH_TYPE_OMAP_ZOOM2; /* boot param addr */ gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) status_led_set (STATUS_LED_BOOT, STATUS_LED_ON);#endif return 0;}
开发者ID:JamesAng,项目名称:ub,代码行数:25,
示例21: board_initint board_init(void){ at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO; /* Enable Ctrlc */ console_init_f(); /* Correct IRDA resistor problem / Set PA23_TXD in Output */ writel(ATMEL_PMX_AA_TXD2, &pio->pioa.oer); gd->bd->bi_arch_number = MACH_TYPE_EB_CPUX9K2; /* adress of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;#ifdef CONFIG_STATUS_LED status_led_set(STATUS_LED_BOOT, STATUS_LED_ON);#endif#ifdef CONFIG_CMD_NAND cpux9k2_nand_hw_init();#endif return 0;}
开发者ID:Aorjoa,项目名称:bootloader,代码行数:21,
示例22: misc_init_rint misc_init_r(void){ uchar mac[8]; uchar tm; uchar midx; uchar macn6, macn7;#ifdef CONFIG_NET_MULTI if (getenv("ethaddr") == NULL) { if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0x00, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *) &mac, sizeof(mac)) != 0) { puts("Error reading MAC from EEPROM/n"); } else { tm = 0; macn6 = 0; macn7 = 0xFF; for (midx = 0; midx < 6; midx++) { if ((mac[midx] != 0) && (mac[midx] != 0xFF)) tm++; macn6 += mac[midx]; macn7 ^= mac[midx]; } if ((macn6 != mac[6]) || (macn7 != mac[7])) tm = 0; if (tm) eth_setenv_enetaddr("ethaddr", mac); else puts("Error: invalid MAC at EEPROM/n"); } }#endif gd->jt[XF_do_reset] = (void *) do_reset;#ifdef CONFIG_STATUS_LED status_led_set(STATUS_LED_BOOT, STATUS_LED_BLINKING);#endif return 0;}
开发者ID:Aorjoa,项目名称:bootloader,代码行数:39,
示例23: board_init/* * Routine: board_init * Description: hardware init. */int board_init(void){ gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ enable_gpmc_cs_config(gpmc_nand_config, &gpmc_cfg->cs[0], CONFIG_SYS_NAND_BASE, GPMC_SIZE_16M); /* board id for Linux */ if (get_cpu_family() == CPU_OMAP34XX) gd->bd->bi_arch_number = MACH_TYPE_CM_T35; else gd->bd->bi_arch_number = MACH_TYPE_CM_T3730; /* boot param addr */ gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) status_led_set(STATUS_LED_BOOT, STATUS_LED_ON);#endif return 0;}
开发者ID:Analias,项目名称:SNOWLeo-SDR-1,代码行数:26,
示例24: board_init_f//.........这里部分代码省略......... env_relocate();#if defined(CONFIG_BOARD_LATE_INIT) board_late_init();#endif#ifdef CONFIG_ID_EEPROM mac_read_from_eeprom();#endif /* IP Address */ bd->bi_ip_addr = getenv_IPaddr("ipaddr");#if defined(CONFIG_PCI) /* * Do pci configuration */ pci_init();#endif /* Initialize stdio devices */ stdio_init(); /* Initialize the jump table for applications */ jumptable_init(); /* Initialize the console (after the relocation and devices init) */ console_init_r();#ifdef CONFIG_SERIAL_SOFTWARE_FIFO serial_buffered_init();#endif#ifdef CONFIG_STATUS_LED status_led_set(STATUS_LED_BOOT, STATUS_LED_BLINKING);#endif udelay(20); set_timer(0); /* Initialize from environment */ if ((s = getenv("loadaddr")) != NULL) { load_addr = simple_strtoul(s, NULL, 16); }#if defined(CONFIG_CMD_NET) if ((s = getenv("bootfile")) != NULL) { copy_filename(BootFile, s, sizeof(BootFile)); }#endif /* CONFIG_CMD_NET */ WATCHDOG_RESET();#if defined(CONFIG_CMD_DOC) WATCHDOG_RESET(); puts("DOC: "); doc_init();#endif#ifdef CONFIG_BITBANGMII bb_miiphy_init();#endif#if defined(CONFIG_CMD_NET)#if defined(CONFIG_NET_MULTI) WATCHDOG_RESET(); puts("Net: ");#endif
开发者ID:Jayjack0116,项目名称:u-boot,代码行数:67,
示例25: initr_status_ledstatic int initr_status_led(void){ status_led_set(STATUS_LED_BOOT, STATUS_LED_BLINKING); return 0;}
开发者ID:barawn,项目名称:u-boot-uub,代码行数:6,
示例26: board_init_r//.........这里部分代码省略......... /* Initialize stdio devices */ stdio_init(); /* Initialize the jump table for applications */ jumptable_init();#if defined(CONFIG_API) /* Initialize API */ api_init();#endif /* Initialize the console (after the relocation and devices init) */ console_init_r();#if defined(CONFIG_MISC_INIT_R) /* miscellaneous platform dependent initialisations */ misc_init_r();#endif#if defined(CONFIG_CMD_KGDB) WATCHDOG_RESET(); puts("KGDB: "); kgdb_init();#endif debug("U-Boot relocated to %08lx/n", dest_addr); /* * Enable Interrupts */ interrupt_init();#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) status_led_set(STATUS_LED_BOOT, STATUS_LED_BLINKING);#endif udelay(20); /* Initialize from environment */ load_addr = getenv_ulong("loadaddr", 16, load_addr); WATCHDOG_RESET();#if defined(CONFIG_CMD_SCSI) WATCHDOG_RESET(); puts("SCSI: "); scsi_init();#endif#if defined(CONFIG_CMD_DOC) WATCHDOG_RESET(); puts("DOC: "); doc_init();#endif#ifdef CONFIG_BITBANGMII bb_miiphy_init();#endif#if defined(CONFIG_CMD_NET) WATCHDOG_RESET(); puts("Net: "); eth_initialize(bd);#endif#if defined(CONFIG_CMD_NET) && defined(CONFIG_RESET_PHY_R) WATCHDOG_RESET();
开发者ID:KunYi,项目名称:uboot-samx6i,代码行数:67,
示例27: net_loop//.........这里部分代码省略......... nc_start(); break;#endif#if defined(CONFIG_CMD_SNTP) case SNTP: sntp_start(); break;#endif#if defined(CONFIG_CMD_DNS) case DNS: dns_start(); break;#endif#if defined(CONFIG_CMD_LINK_LOCAL) case LINKLOCAL: link_local_start(); break;#endif default: break; } break; }#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)#if defined(CONFIG_SYS_FAULT_ECHO_LINK_DOWN) && / defined(CONFIG_STATUS_LED) && / defined(STATUS_LED_RED) /* * Echo the inverted link state to the fault LED. */ if (miiphy_link(eth_get_dev()->name, CONFIG_SYS_FAULT_MII_ADDR)) status_led_set(STATUS_LED_RED, STATUS_LED_OFF); else status_led_set(STATUS_LED_RED, STATUS_LED_ON);#endif /* CONFIG_SYS_FAULT_ECHO_LINK_DOWN, ... */#endif /* CONFIG_MII, ... */#ifdef CONFIG_USB_KEYBOARD net_busy_flag = 1;#endif /* * Main packet reception loop. Loop receiving packets until * someone sets `net_state' to a state that terminates. */ for (;;) { WATCHDOG_RESET();#ifdef CONFIG_SHOW_ACTIVITY show_activity(1);#endif if (arp_timeout_check() > 0) time_start = get_timer(0); /* * Check the ethernet for a new packet. The ethernet * receive routine will process it. * Most drivers return the most recent packet size, but not * errors that may have happened. */ eth_rx(); /* * Abort if ctrl-c was pressed. */ if (ctrlc()) {
开发者ID:0xFelix,项目名称:u-boot-edminiv2,代码行数:67,
示例28: status_led_set_rint status_led_set_r(void){ status_led_set(STATUS_LED_BOOT, STATUS_LED_BLINKING); return 0;}
开发者ID:czheji,项目名称:u-boot,代码行数:6,
示例29: misc_init_r//.........这里部分代码省略......... } /* * Bring the I2C clock and data lines low for initialization */ I2C_SCL(0); I2C_DELAY; I2C_SDA(0); I2C_ACTIVE; I2C_DELAY; /* Reset the DAC */ iopa->pdat &= ~DAC_RST_MASK; udelay(DAC_RESET_DELAY); /* Release the DAC reset */ iopa->pdat |= DAC_RST_MASK; udelay(DAC_INITIAL_DELAY); /* * Cause the DAC to: * Enable control port (I2C mode) * Going into power down */ i2c_reg_write(I2C_DAC_ADDR, 0x05, DAC_REG5_I2C_MODE | DAC_REG5_POWER_DOWN); /* * Cause the DAC to: * Enable control port (I2C mode) * Going into power down * . MCLK divide by 1 * . MCLK divide by 2 */ i2c_reg_write(I2C_DAC_ADDR, 0x05, DAC_REG5_I2C_MODE | DAC_REG5_POWER_DOWN | (mclk_divide ? DAC_REG5_MCLK_DIV : 0)); /* * Cause the DAC to: * Auto-mute disabled * . Format 0, left justified 24 bits * . Format 3, right justified 24 bits * No de-emphasis * . Single speed mode * . Double speed mode */ i2c_reg_write(I2C_DAC_ADDR, 0x01, (right_just ? DAC_REG1_RIGHT_JUST_24BIT : DAC_REG1_LEFT_JUST_24_BIT) | DAC_REG1_DEM_NO | (sample_rate >= 50000 ? DAC_REG1_DOUBLE : DAC_REG1_SINGLE)); sprintf(str_buf, "%d", sample_rate >= 50000 ? DAC_REG1_DOUBLE : DAC_REG1_SINGLE); setenv("DaqDACFunctionalMode", str_buf); /* * Cause the DAC to: * Enable control port (I2C mode) * Remove power down * . MCLK divide by 1 * . MCLK divide by 2 */ i2c_reg_write(I2C_DAC_ADDR, 0x05, DAC_REG5_I2C_MODE | (mclk_divide ? DAC_REG5_MCLK_DIV : 0)); /* * Create a I2C stop condition: * low->high on data while clock is high. */ I2C_SCL(1); I2C_DELAY; I2C_SDA(1); I2C_DELAY; I2C_TRISTATE; if (!quiet) { printf("/n"); }#ifdef CONFIG_ETHER_LOOPBACK_TEST /* * Run the Ethernet loopback test */ eth_loopback_test ();#endif /* CONFIG_ETHER_LOOPBACK_TEST */#ifdef CONFIG_SHOW_BOOT_PROGRESS /* * Turn off the RED fail LED now that we are up and running. */ status_led_set(STATUS_LED_RED, STATUS_LED_OFF);#endif return 0;}
开发者ID:54shady,项目名称:uboot_tiny4412,代码行数:101,
注:本文中的status_led_set函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ status_set_viewdata函数代码示例 C++ status_calc_pc函数代码示例 |