mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-23 04:04:44 +08:00
tftp: implement support for LED activity
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal traffic. Also turn the ACTIVITY LED OFF if a CTRL-C is detected in the main net loop function. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
aad8cfa3ca
commit
5d162bbb20
@ -87,6 +87,7 @@
|
||||
#include <env_internal.h>
|
||||
#include <errno.h>
|
||||
#include <image.h>
|
||||
#include <led.h>
|
||||
#include <log.h>
|
||||
#include <net.h>
|
||||
#include <net6.h>
|
||||
@ -664,6 +665,9 @@ restart:
|
||||
/* Invalidate the last protocol */
|
||||
eth_set_last_protocol(BOOTP);
|
||||
|
||||
/* Turn off activity LED if triggered */
|
||||
led_activity_off();
|
||||
|
||||
puts("\nAbort\n");
|
||||
/* include a debug print as well incase the debug
|
||||
messages are directed to stderr */
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <efi_loader.h>
|
||||
#include <env.h>
|
||||
#include <image.h>
|
||||
#include <led.h>
|
||||
#include <lmb.h>
|
||||
#include <log.h>
|
||||
#include <mapmem.h>
|
||||
@ -185,6 +186,7 @@ static void new_transfer(void)
|
||||
#ifdef CONFIG_CMD_TFTPPUT
|
||||
tftp_put_final_block_sent = 0;
|
||||
#endif
|
||||
led_activity_blink();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CMD_TFTPPUT
|
||||
@ -294,6 +296,9 @@ static void tftp_complete(void)
|
||||
time_start * 1000, "/s");
|
||||
}
|
||||
puts("\ndone\n");
|
||||
|
||||
led_activity_off();
|
||||
|
||||
if (!tftp_put_active)
|
||||
efi_set_bootdev("Net", "", tftp_filename,
|
||||
map_sysmem(tftp_load_addr, 0),
|
||||
|
Loading…
Reference in New Issue
Block a user