-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sys/shell: changed signature of put_char pointer #3202
Conversation
changed from void(*put_char)(int) to int(*putchar)(int). This is beneficial, as now the std-libs putchar can be given as an argument to shell_init() directly.
What is the |
Yepp, but that is another 'Bautstelle' :-) I think there is even an open issue for that, though I did not find it right now. So that is why I kept that out of this PR and focused on making the shell easier to use/initialize for now. |
For now it's okay I guess. But we should work towards a state, where we just can hand over a file-descriptor-like identifier to the shell initialization, so we can implement fun stuff like mosh in the future. |
yes, that would be nice and that is indeed where we should be (and are) headed. So are you ok with merging this PR in the current state for now? Then feel free to add the 'ready for review' label and restart Travis :-) |
Yes, ACK & go when Travis is happy. |
Travis is happy -> go. |
sys/shell: changed signature of put_char pointer
The shell initialization is kind of ugly in many applications, as some explicitly define read/write functions to be used by the shell. With the change of the signature for the
put_char
argument, it is now possible to pass the stdlib'sputchar
directly as an argument. This is expacially useful, once uart0 is removed -> see #3164.I adapted the
uart0_putc()
function in the uart0 module and made all applications that use uart0 use this function. For some tests, that are not using uart0, I adapted them to use the stdlib calls (putchar, getchar) directly.