Skip to content
Snippets Groups Projects
Commit f2d8b3c8 authored by rahix's avatar rahix
Browse files

chore(pycardium): Refactor header printing code


Always print the pycardium header and a short message afterwards what
pycardium is about to do.

Signed-off-by: default avatarRahix <rahix@rahix.de>
parent 7befa10d
No related branches found
No related tags found
1 merge request!417Pycardium Improvements
...@@ -32,11 +32,19 @@ int main(void) ...@@ -32,11 +32,19 @@ int main(void)
pycardium_hal_init(); pycardium_hal_init();
epic_uart_write_str(header, sizeof(header));
if (cnt < 0) { if (cnt < 0) {
printf("pycardium: Error fetching args: %d\n", cnt); printf("pycardium: Error fetching args: %d\n", cnt);
} else if (cnt > 0) {
epic_uart_write_str(header, sizeof(header)); /* Go to REPL instead. */
cnt = 0;
}
if (cnt > 0) {
printf(" Loading %s ...\n", script_name); printf(" Loading %s ...\n", script_name);
} else {
printf(" Entering REPL ...\n\n");
} }
mp_stack_set_top(&__StackTop); mp_stack_set_top(&__StackTop);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment