forked from benblazak/ergodox-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Partial rewrite #1
Open
nimishgautam
wants to merge
75
commits into
dyuri:repa
Choose a base branch
from
nimishgautam:partial-rewrite
base: repa
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.
Open
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
now pressing and releasing both numlock keys
originally, it seemed that the little endian version of write...(), and the big endian version of read...() would be the easiest. this was true, when i first wrote the functions. after optimization, the big endian write...() got much better, but for some reason, i couldn't quite crack the little endian read...(). perhaps i'm missing something. in any case, the big endian versions of both look quite good to me now, so they're what i'll be going with. too bad the little endian versions didn't quite work out... but i was expecting to go with the big endian versions anyway, since we'll be reading much more often than writing. // - sizes for each function (in bytes) (with optimizations on): // // function frame stack // read big endian 154 3 10 // read little endian 200 2 10 // write big endian 160 0 6 // write little endian 172 0 5 also, note that while optimizing, i was looking only at compiled function size, and frame and stack usage: actual profiling would have been a bit difficult, and i don't feel like writing versions of the algorithms for testing on my laptop right now (though, i might later, for fun, if i can give it as an assignment to the class i hopefully TA for next semester - hehe). i tried to pay attention to the amount of code inside the loops though, when i was changing things, and i'm under the impression that the AVR has fairly predictably timed assembly instructions (1 or 2 cycles each?), so compiled function size seemed like a good proxy. done experimenting with this for now. yay! :) . i'll remove the extra code in the next commit.
static variables are initialized to 0 by the compiler, per the standard
really, it'd be hard to test any of this stuff until i have it implemented in the layout; so it might be a while.
there are a few warnings during compile, but only about functions not being used. it's okay: they'll be used soon enough.
rough draft done! need to finish -- and check it *thoroughly* to make sure it works (and to clean it up) :)
almost done with this module!
just need to implement eeprom_macro's in a layout now, to test them!
this will likely be in development for a long time, if it ever amounts to anything at all
will probably have to take a break for a while javascript looks promising :) . this application just lends itself so well to state! or maybe it's because i'm not used to programming in a pure functional language like Elm... Elm is fun though :) decided not to write a second test for Elm. partly because i didn't have time. what i wanted to try was doing things based on the Elm calculator example. I haven't tried using buttons yet, and they might work out. then again, it might turn out to be a whole lot easier in javascript. and then it would be a bit more portable as well... so i suppose i'm leaning towards javascript. we'll see :)
to see how it works -- now testing with my original cherry blue prototype board (with no case)
https://github.com/benblazak/ergodox-firmware/pull/28/files#diff-68c80b7 ec6db8052483242e86572c46eR56, added mouse movement example function
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.
I tried to merge your code from here: https://github.com/benblazak/ergodox-firmware/pull/28/files#diff-68c80b7ec6db8052483242e86572c46eR56 into the current "partial-rewrite" branch.
I was able to get the mouse stuff working really well, but the NKRO doesn't seem to be working. (At least, when turning NKRO on, it doesn't send anything) I've disabled it in the Makefile for now.