-
Notifications
You must be signed in to change notification settings - Fork 8
ec-test-app: Add serial source #38
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
base: main
Are you sure you want to change the base?
Conversation
philgweber
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will have to think about the transport and integrating with FFA and secure world so we have the ability to redirect messages through either path.
So I was thinking this can be used as an alternative to going through FFA when someone jsut wants to quickly connect to a board and do some testing of the services. In my mind I imagined this app will just select the |
72c2645 to
75bdfa4
Compare
75bdfa4 to
00a491e
Compare
00a491e to
291ab9f
Compare
| fn charge_state_as_str(state: BatteryState) -> &'static str { | ||
| if state.contains(BatteryState::DISCHARGING) { | ||
| "Discharging" | ||
| } else { | ||
| "Charging" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
impl Display for BatteryState?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BatteryState is a foreign type and Display is a foreign trait so orphan rule wouldn't allow that, right? But can give it a try.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is battery state defined? Could impl Display on that crate and just rely on it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's defined by the embedded-batteries crate which is reexported by the battery-service-messages crate. Was also missing a couple TryFrom<u32>s in there which I opened a PR for so I can do that for these as well. However, initial attempts to update embedded-batteries throughout caused a lot of issues so ideally would like this to get in first then can take the time to fix everything that an embedded-batteries update will cause.
williampMSFT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
|
Will wait for #41 to merge, then update this PR to implement |
This PR does a few things:
Source, which allows the app to talk directly to a dev platform in user-space (over a COM port for example). Can be useful for testing services without needing to worry about FFA and whatnot.Tested this on the
dev-imxrtplatform and works pretty well. I was running into some issues where I occasionally receive bytes that shouldn't be coming in for reasons I haven't been able to figure out yet, but if we drain the incoming bytes and just return an error it leaves things in a good state for the next attempt and we quickly recover.