mirror of
https://github.com/supleed2/EIE4-FYP.git
synced 2024-11-10 04:15:49 +00:00
Rename ledchaser module to line up with ifdefs
This commit is contained in:
parent
48b8e17ff2
commit
2f40fb3bb5
|
@ -83,11 +83,9 @@ static void help(void) {
|
||||||
puts("Available commands:");
|
puts("Available commands:");
|
||||||
puts("help - Show this command");
|
puts("help - Show this command");
|
||||||
puts("reboot - Reboot CPU");
|
puts("reboot - Reboot CPU");
|
||||||
#ifdef CSR_LEDS_BASE
|
|
||||||
puts("led - Led demo");
|
|
||||||
#endif
|
|
||||||
puts("donut - Spinning Donut demo");
|
puts("donut - Spinning Donut demo");
|
||||||
#ifdef CSR_LEDS_BASE
|
#ifdef CSR_LEDS_BASE
|
||||||
|
puts("led - Led demo");
|
||||||
puts("leds - Led set demo");
|
puts("leds - Led set demo");
|
||||||
#endif
|
#endif
|
||||||
#ifdef CSR_AUDIO_BASE
|
#ifdef CSR_AUDIO_BASE
|
||||||
|
@ -117,9 +115,7 @@ void led(void);
|
||||||
static void led_cmd(void) {
|
static void led_cmd(void) {
|
||||||
led();
|
led();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CSR_LEDS_BASE
|
|
||||||
static void leds_cmd(char **val) {
|
static void leds_cmd(char **val) {
|
||||||
int value = (int)strtol(get_token(val), NULL, 0);
|
int value = (int)strtol(get_token(val), NULL, 0);
|
||||||
printf("Setting LED to %6x\n", value);
|
printf("Setting LED to %6x\n", value);
|
||||||
|
@ -250,13 +246,11 @@ static void console_service(void) {
|
||||||
help();
|
help();
|
||||||
else if (strcmp(token, "reboot") == 0)
|
else if (strcmp(token, "reboot") == 0)
|
||||||
reboot_cmd();
|
reboot_cmd();
|
||||||
#ifdef CSR_LEDS_BASE
|
|
||||||
else if (strcmp(token, "led") == 0)
|
|
||||||
led_cmd();
|
|
||||||
#endif
|
|
||||||
else if (strcmp(token, "donut") == 0)
|
else if (strcmp(token, "donut") == 0)
|
||||||
donut_cmd();
|
donut_cmd();
|
||||||
#ifdef CSR_LEDS_BASE
|
#ifdef CSR_LEDS_BASE
|
||||||
|
else if (strcmp(token, "led") == 0)
|
||||||
|
led_cmd();
|
||||||
else if (strcmp(token, "leds") == 0)
|
else if (strcmp(token, "leds") == 0)
|
||||||
leds_cmd(&str);
|
leds_cmd(&str);
|
||||||
#endif
|
#endif
|
||||||
|
|
15
make.py
15
make.py
|
@ -198,17 +198,18 @@ class BaseSoC(SoCCore):
|
||||||
|
|
||||||
# Leds -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
if with_led_chaser:
|
if with_led_chaser:
|
||||||
# self.leds = LedChaser(
|
self.ledchaser = LedChaser(
|
||||||
# pads = platform.request_all("user_led"),
|
pads = platform.request_all("user_led"),
|
||||||
# sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq
|
||||||
|
)
|
||||||
# self.leds = TestLed(
|
# self.leds = TestLed(
|
||||||
# platform = platform,
|
# platform = platform,
|
||||||
# pads = platform.request_all("user_led")
|
# pads = platform.request_all("user_led")
|
||||||
# )
|
# )
|
||||||
self.leds = TestRgb(
|
# self.leds = TestRgb(
|
||||||
platform = platform,
|
# platform = platform,
|
||||||
pads = platform.request_all("user_led")
|
# pads = platform.request_all("user_led")
|
||||||
)
|
# )
|
||||||
|
|
||||||
# GPIO Pins --------------------------------------------------------------------------------
|
# GPIO Pins --------------------------------------------------------------------------------
|
||||||
platform.add_extension([
|
platform.add_extension([
|
||||||
|
|
Loading…
Reference in a new issue