Skip to content

sys/shell: add peripheral command handler#2054

Closed
LudwigKnuepfer wants to merge 4 commits intoRIOT-OS:masterfrom
LudwigKnuepfer:shell-periph
Closed

sys/shell: add peripheral command handler#2054
LudwigKnuepfer wants to merge 4 commits intoRIOT-OS:masterfrom
LudwigKnuepfer:shell-periph

Conversation

@LudwigKnuepfer
Copy link
Copy Markdown
Member

As of now provides rtc and random commands.

@LudwigKnuepfer LudwigKnuepfer added Type: new feature The issue requests / The PR implemements a new feature for RIOT Area: drivers Area: Device drivers labels Nov 20, 2014
@LudwigKnuepfer
Copy link
Copy Markdown
Member Author

Due to a bug (compare #2058) in the make system a more modular structure is not feasible at the moment.

@OlegHahm
Copy link
Copy Markdown
Member

So, now we would have two rtc shell command handlers?

@LudwigKnuepfer
Copy link
Copy Markdown
Member Author

Yes and no - one is called rtc and the other gettime/settime. But the rtc handler will only be active if the peripheral is available, and that is currently not implemented.

@LudwigKnuepfer
Copy link
Copy Markdown
Member Author

Also, the driver shell command (from sys/shell/commands/sc_rtc) would be available only if the rtc module is being used and I expect implementations to only support one of both (either module for legacy implementations or peripheral driver for contemporary ones) during the transition.

@OlegHahm
Copy link
Copy Markdown
Member

That's getting more and more weird. I'll take a look at merging the two interfaces.

@LudwigKnuepfer
Copy link
Copy Markdown
Member Author

They don't offer the same functionality. I'd just eradicate drivers/rtc.

@LudwigKnuepfer
Copy link
Copy Markdown
Member Author

("Would" because I don't want to do the work at the moment.)

@LudwigKnuepfer
Copy link
Copy Markdown
Member Author

@haukepetersen wrote in #2056 (comment) that these shell commands are a doubled effort for the existing test applications.

I think it is necessary to differentiate between interfaces. I agree that a random shell command might be superfluous, but this is not the case for the rtc. I have not looked into the other interfaces yet.

@LudwigKnuepfer
Copy link
Copy Markdown
Member Author

PS:
If none of the interfaces despite rtc should make sense to support, I could also just move the implementation into the rtc shell command if @OlegHahm comes through with a PR that converts the remaining periph/rtc implementations.

@LudwigKnuepfer LudwigKnuepfer added the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Nov 20, 2014
@LudwigKnuepfer
Copy link
Copy Markdown
Member Author

@haukepetersen @OlegHahm OK, after looking at the current peripheral drivers and thinking about it I guess I'll just move this PR's rtc command implementation into sys/shell/commands/sc_rtc.c and discard this PR. What do you think?

@OlegHahm
Copy link
Copy Markdown
Member

👍

@LudwigKnuepfer LudwigKnuepfer deleted the shell-periph branch November 20, 2014 17:40
@haukepetersen
Copy link
Copy Markdown
Contributor

+1

@LudwigKnuepfer
Copy link
Copy Markdown
Member Author

#2061

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: drivers Area: Device drivers CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants