-
Notifications
You must be signed in to change notification settings - Fork 201
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
Play with trinkey #669
Draft
paulz
wants to merge
47
commits into
atsamd-rs:master
Choose a base branch
from
paulz:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Play with trinkey #669
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am definitely struggling a bit with what's coming back from the USB calls, and I don't know yet how really to initialize the neopixel There's a bunch of commented out code that is in the direction of what I mean to do.
WIP: trying to have the morse code generation at least emit .__. to the serial port, but reinitializing the interface doesn't make sense. Need to refactor so that the global abstraction for the hardware we've configured is more globally accessible (or easier to pass around.)
with a duration of 1.
we do handle an empty queue. Next, make the queue into a circular buffer, and push stuff into it. It would sure be nice to have some tests.
drain the last state.) Board now blinks S-N-S, followed after an interval with a 10 unit long ON pulse.
doesn't honor this yet.)
independently. Note that the queue doesn't (currently) worry about overflow. It CAN and WILL overflow if it's filled faster than it drains. That said, all that results is some states not being rendered to the pins.
It still would benefit from a letter queue, but this works as long as you don't type too fast. Needs some cleanup though.
I left the stubs of the character queue in place, so I can finish that out, but this is way shorter now. I wish I had a way to generate the initial queue state, but iterators are part of std, which we don't have access to.
Next we should use it.
Tried to make the USB loop provide queue length stats, but not having std in embedded rust meant I wasn't sure how to convert my usize into a string. (I made it a u32 at least.)
QA'd all letters and numbers but haven't verified punctuation.
The module isn't used yet.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
[describe your changes here]
Checklist
CHANGELOG.md
for the BSP or HAL updatedIf Adding a new Board
crates.json
If Adding a new cargo
feature
to the HALcrates.json