-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
user: create first demo that display ascii art
- Loading branch information
Showing
9 changed files
with
164 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#ifndef USER_DEMO1_H_ | ||
#define USER_DEMO1_H_ | ||
|
||
void user_task(void); | ||
void display_ascii_art(void); | ||
|
||
#endif /* USER_DEMO1_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "user/demo1.h" | ||
|
||
#include "peripherals/uart.h" | ||
|
||
void user_task(void) | ||
{ | ||
while (1) { | ||
for (int i = 0; i < 50; i++) { | ||
uart_printf(CONSOLE, "first_task (user): %d\r\n", i); | ||
} | ||
} | ||
} | ||
|
||
/* ASCII art | ||
* https://www.asciiart.eu/vehicles/trains | ||
*/ | ||
void display_ascii_art(void) | ||
{ | ||
uart_printf(CONSOLE, " _____ . . . . . o o o o o\n"); | ||
uart_printf(CONSOLE, " __|[_]|__ ___________ _______ ____ o\n"); | ||
uart_printf(CONSOLE, " |[] [] []| [] [] [] [] [_____(__ ][]]_n_n__][.\n"); | ||
uart_printf(CONSOLE, "_|________|_[_________]_[________]_|__|________)<\n"); | ||
uart_printf(CONSOLE, " oo oo 'oo oo ' oo oo 'oo 0000---oo\\_\n"); | ||
uart_printf(CONSOLE, " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.