Skip to content
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

Merged
merged 5 commits into from
Jun 15, 2015

Conversation

haukepetersen
Copy link
Contributor

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's putchar 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.

@haukepetersen haukepetersen added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation labels Jun 14, 2015
@haukepetersen haukepetersen added this to the Release 2015.06 milestone Jun 14, 2015
@haukepetersen haukepetersen mentioned this pull request Jun 14, 2015
10 tasks
@miri64
Copy link
Member

miri64 commented Jun 14, 2015

What is the put_char function used for anyways? Not to print output to the shell at least, since most shell commands use either puts() or printf().

@haukepetersen
Copy link
Contributor Author

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.

@miri64
Copy link
Member

miri64 commented Jun 15, 2015

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.

@haukepetersen
Copy link
Contributor Author

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 :-)

@miri64
Copy link
Member

miri64 commented Jun 15, 2015

Yes, ACK & go when Travis is happy.

@miri64 miri64 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 15, 2015
@haukepetersen
Copy link
Contributor Author

Travis is happy -> go.

haukepetersen added a commit that referenced this pull request Jun 15, 2015
sys/shell: changed signature of put_char pointer
@haukepetersen haukepetersen merged commit 55752ff into RIOT-OS:master Jun 15, 2015
@haukepetersen haukepetersen deleted the opt_shell_init branch June 15, 2015 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants