Use `shell_api.h` and the buffer structure in `shell` and `libshell` to avoid magic numbers and sync Reviewed-on: #657 Reviewed-by: Burer <burer@kolibrios.org> Co-authored-by: Egor00f <y.yarin@inbox.ru>
19 lines
263 B
C
19 lines
263 B
C
#include <shell_api.h>
|
|
|
|
char shell_getc()
|
|
{
|
|
__shell_init();
|
|
|
|
if (__shell_is_init == __SHELL_INIT_OK)
|
|
{
|
|
__shell_shm->cmd = SHELL_GETC;
|
|
__SHELL_WAIT();
|
|
|
|
return __shell_shm->data[0];
|
|
}
|
|
else
|
|
{
|
|
return 0;
|
|
}
|
|
}
|