2022-04-15 11:11:49 +02:00
|
|
|
#include "../include/shell_api.h"
|
2021-09-26 21:56:07 +02:00
|
|
|
|
|
|
|
char string[256];
|
|
|
|
|
2022-04-15 11:11:49 +02:00
|
|
|
int main()
|
|
|
|
{
|
2021-09-26 21:56:07 +02:00
|
|
|
shell_cls();
|
|
|
|
shell_printf("SHELL PID=%d\n\r", shell_get_pid());
|
2022-04-15 11:11:49 +02:00
|
|
|
|
2021-09-26 21:56:07 +02:00
|
|
|
shell_puts("This is a test console application for Shell\n\r");
|
|
|
|
shell_puts("Type a string (255 symbols max): ");
|
|
|
|
|
|
|
|
shell_gets(string, 255);
|
|
|
|
shell_printf("You typed: %s\n\r", string);
|
2022-04-15 11:11:49 +02:00
|
|
|
|
2021-09-26 21:56:07 +02:00
|
|
|
shell_puts("Press any key: ");
|
|
|
|
string[0] = shell_getc();
|
|
|
|
shell_printf("\n\rYou pressed: %c", string[0]);
|
|
|
|
shell_exit();
|
|
|
|
return 0;
|
|
|
|
}
|