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

Partial rewrite #1

Open
wants to merge 75 commits into
base: repa
Choose a base branch
from
Open

Conversation

nimishgautam
Copy link

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.

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
benblazak and others added 30 commits May 24, 2014 16:30
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) :)
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants