Commit Graph

294 Commits (master)

Author SHA1 Message Date
Stefan Dorn c88a558e8c more safety 2016-02-04 14:58:58 +00:00
Stefan Dorn 5419ab9d7a yes i can loops why 2016-02-04 14:19:14 +00:00
Stefan Dorn 37faadc8aa initialize layers to be safe 2016-02-04 14:19:06 +00:00
Stefan Dorn c08df8dc25 layers are a bit easier now 2016-02-04 14:18:46 +00:00
Stefan Dorn 43228a265a oops 2016-02-04 12:28:07 +00:00
Stefan Dorn d0f71834aa some cleanup 2016-02-04 11:24:51 +00:00
Stefan Dorn fc3259de73 minor refactor 2016-02-04 11:18:09 +00:00
Stefan Dorn fef0497fcf begin layer stacking refactor 2016-02-04 10:19:42 +00:00
Stefan Dorn ac64381896 better names 2016-02-04 10:09:07 +00:00
Stefan Dorn f9f5e4b5aa replace the stack with a flat array 2016-02-04 10:00:05 +00:00
Stefan Dorn c695c37c40 more refactor 2016-02-04 09:38:07 +00:00
Stefan Dorn e19ca08263 remove led code 2016-02-04 09:26:58 +00:00
Stefan Dorn d1c105848b remove old layouts 2016-02-04 09:26:41 +00:00
Stefan Dorn f0da34b909 more refactor 2016-02-04 09:22:40 +00:00
Stefan Dorn 01c9587d31 simplify layers 2016-02-04 08:42:22 +00:00
Stefan Dorn f3654c9fe0 more refactor 2016-02-04 07:47:22 +00:00
Stefan Dorn 447f1fb2cb begin major refactor to replace the layer stack 2016-02-04 06:43:33 +00:00
Stefan Dorn ccd324d972 cleanup 2016-02-04 06:34:57 +00:00
Stefan Dorn 5b65f3eb7c test keys for layout stacking debugs 2016-02-04 04:38:29 +00:00
Stefan Dorn 2159af0050 minor cleanup 2016-02-04 04:38:18 +00:00
Stefan Dorn e71b8fbeb0 simplify names 2016-02-04 04:27:48 +00:00
Stefan Dorn ec5eadf8a5 oops, forgot to commit last time 2016-01-26 15:34:20 +00:00
Stefan Dorn 068da79193 *all* media keys 2016-01-26 15:33:59 +00:00
Stefan Dorn fecaf571c8 Revert "fix sticky keys"
This reverts commit ba20aaebfd.
2016-01-21 14:26:08 +00:00
Stefan Dorn ba20aaebfd fix sticky keys 2016-01-09 23:54:58 +00:00
Stefan Dorn f7781d869c map f13-f24 for testing 2016-01-04 15:55:10 +00:00
Stefan Dorn 133f6823cf fix f14 and up 2016-01-04 15:55:00 +00:00
Stefan Dorn 2d1023cf42 alternative tab for bg2 2015-12-25 01:04:29 +00:00
Stefan Dorn 4764b3d363 fix broken latch 2015-12-17 21:17:09 +00:00
Stefan Dorn fa72af8504 use generated layout 2015-12-14 01:23:58 +00:00
Stefan Dorn 3121420267 basic layout generator 2015-12-14 00:28:13 +00:00
Stefan Dorn 8b392e14fb control-del key 2015-12-09 10:20:56 +00:00
Stefan Dorn 3325dea1cf alternative alt position 2015-12-08 07:55:00 +00:00
Stefan Dorn cf1b23b36d fix empty key 2015-12-08 07:54:51 +00:00
Stefan Dorn 2091d368c8 reverse right side 2015-11-02 15:46:53 +00:00
Stefan Dorn 58ae2cd244 cuter name 2015-11-02 15:25:02 +00:00
Stefan Dorn 431f620d5b work identically on 80-key version 2015-11-02 15:24:46 +00:00
Stefan Dorn d9d7f242b2 try menu key 2015-08-29 09:53:29 +01:00
Stefan Dorn 565ea0a478 cleanup 2015-08-29 09:53:26 +01:00
Stefan Dorn b2c04fbbed space on mod3 2015-08-01 06:56:11 +01:00
Stefan Dorn c5b328ea67 put enter on keys 2015-07-30 09:06:22 +01:00
Stefan Dorn 312b996d1b a bit more natural arrow keys on the right 2015-07-25 22:42:11 +01:00
Stefan Dorn 3aee762143 duplicate arrow keys on the right 2015-07-23 20:24:52 +01:00
Stefan Dorn 1983339d01 fix altR 2015-07-22 22:06:34 +01:00
Stefan Dorn 5e62e82595 alternatives to the worst pinky keys 2015-07-22 22:04:15 +01:00
Stefan Dorn 884b5ab884 mod3 is ready 2015-07-22 22:01:29 +01:00
Stefan Dorn b4bb0ff792 move everything into hardware 2015-07-22 21:27:58 +01:00
Stefan Dorn fee69ebeaf fill in some unnecessary gaps 2015-07-22 19:37:11 +01:00
Stefan Dorn 9ce238017c setup mod3 on FN1 2015-07-22 18:51:53 +01:00
Stefan Dorn c0fabeae17 move mod4 into hardware 2015-07-21 08:58:59 +01:00
Stefan Dorn fac5d540d2 basic saneo layout 2015-07-20 19:43:50 +01:00
Jacob McIntosh 9fffce4cb8 Forgot to remove this. 2014-03-28 01:02:10 -05:00
Jacob McIntosh 03e1485587 Fixed comment. 2014-03-28 00:40:55 -05:00
Jacob McIntosh 535a67de5d Added comment mentioning only known bug. Minor. 2014-03-28 00:25:06 -05:00
Jacob McIntosh 3455d4a1d4 Removing +x from source files. 2014-03-27 12:12:31 -05:00
Jacob McIntosh 1fe98c0a74 Comment fixes. 2014-03-27 11:59:03 -05:00
Jacob McIntosh 6998047e2a Fixed repeating-mediakey bug, attempt fixing workman-P
Inverted shift code now moved to the layout.
2014-03-27 11:38:42 -05:00
Jacob McIntosh b1c85b73fe Added volume media keys, fixed workman-p layout, added two todo's 2014-03-27 07:15:02 -05:00
Jacob McIntosh 84a6d90a7b Comment tweaks. 2014-03-26 15:01:41 -05:00
Jacob McIntosh 3c1c86f3ae Adding workman-p-kinesis-mod layout. 2014-03-14 15:48:59 -05:00
Jacob McIntosh 7fe2b46280 Added -f to clean command, so it actually cleans. 2014-03-14 15:48:34 -05:00
Jacob McIntosh 971eb539aa Added missing MEDIAKEY_STOP entry (TRANSPORT_STOP was already present). 2014-03-14 15:43:17 -05:00
Ben Blazak 1a38c77ee8 fixed small typo (thanks Rema!) 2013-10-21 10:24:12 -07:00
Ryan Prince 513b82d585 adding media keys
taken from Hasu codebase (https://github.com/tmk/tmk_keyboard) usb.c/.h
and usb_extra.c/.h, though these files only have the PJRC
copyright/license in the header
2013-04-14 00:29:47 -07:00
Ryan Prince 45c901c308 usb_extra.c now compiles 2013-04-13 16:33:30 -07:00
Ryan Prince ed37259e69 adding usb_extra.c/.h from Hasu's tmk code. Won't compile as is. 2013-04-13 09:52:49 -07:00
Ryan Prince 16992c2ea2 small layout change to move backspace, remove delete, and add tab on layer1 2013-04-13 09:45:43 -07:00
Ryan Prince 3008a6d759 removed TODO comment and readded deleted whitespace as per code review comments 2013-04-10 13:23:26 -07:00
Ryan Prince 22e1965902 added a created by line per code review comments and moved the configurator link to come after the description 2013-04-10 13:22:50 -07:00
Ryan Prince 2c39db717a adding layout description and updated layout. removing unused layers 2013-04-10 13:15:32 -07:00
Ryan Prince 26b46ac7d3 Swapping layer 2 sticky and layer 2 toggle keys. Now that sticky works
as desired, it is possible to hold the sticky key down for short number
runs and it is now a more frequently used key that toggle. Also added
notes about mac keycodes that I found in search of play/next/prev
buttons. I suspect that codes need to be inserted into the USB data
stream to indicate that a media key is being pressed.
2013-04-09 11:56:25 -07:00
Ryan Prince 2cd405ad08 checking in my layout file as an example of sticky key usage 2013-04-08 11:55:38 -07:00
Ryan Prince ce4495372c caching the transparent key pressed result to fix sticky key bug
the behavior for transparent keys not affecting sticky key state was
broken because kbfun_transparent() was only getting called for key
press and not for key release because the layer for the key was cached
on keypress. By caching the transparent key press result on key press
we can ensure that the main_arg_trans_key_pressed is set correctly for
any key function called on key release
2013-04-08 11:51:01 -07:00
Ryan Prince 4e56966795 fixing bug/adding function for sticky key behavior - kbfun_press_release_preserve_sticky()
kbfun_press_release_preserve_sticky() is meant to replace
kbfun_press_release as the function used for standard modifiers (shift,
control, alt, and gui) so that the sticky state is preserved and it is
possible to key in chorded commands using a key on another layer
pressing the keys in the chord one key at a time simultaneously without
breaking the sticky state. (e.g. ctrl+F2 as lsticky2, ctrl, x [where x
is defined as F2 on layer 2]

TODO: Noticed a bug where the transparent behavior does not work as
expected for modifiers. lsticky2, ctrl, x does not produce ctrl+F2 when
ctrl is defined as transparent on layer 2 and keycode=ctrl,
press=kprrel, release=kprrel on layer 0.
2013-04-08 10:54:49 -07:00
Ryan Prince eb24aef2d5 cleaning up local changes to prep the sticky keys change for a pull request 2013-04-08 08:49:58 -07:00
Ryan Prince 208aad93d3 Revert "adding local makefile changes"
This reverts commit d88b55a6d9.
2013-04-08 08:48:46 -07:00
Ryan Prince 15a91f7b05 fixing a bug in sticky key one time state behavior, cleaning up a comment, and making braces style consistent with the rest of the code.
sticky layers in the one time state were being popped anytime
kbfun_press_release() was called, which should only happen if the key
was defined for the sticky layer, i.e. kbfun_transparent() was not the
first function mapped to that key in the topmost layer.
2013-04-08 08:46:25 -07:00
Ryan Prince 2d5c6084c0 removing sticky off state, it is never used because off means the layer was popped 2013-04-08 00:56:06 -07:00
Ryan Prince d88b55a6d9 adding local makefile changes 2013-04-08 00:49:59 -07:00
Ryan Prince f2d650b996 adding sticky key functionality
This function gives similar behavior to sticky keys for modifiers
available on most operating systems. It is considered an accessibility
feature because it alleviates the user from having to hold down
modifiers while pressing a key to produce the modified key function. It
is useful for fast touch typing because you can avoid chording motions
which both strain your hands and take your hands out of home-row
position while pressing normal alpha keys.

This function emulates the 3-state behavior which is default on OS X
and optional in Windows where the modifier cycles between
Off->Once->Locked states. This is particularly handy for symbol layers
where you typically only type one symbol before you want to return to
unmodified typing (layer 0), e.g. 'if (condition) { a = "b" + "c"; }'.
If you assign a symbol layer to a thumb key as a layer sticky cycle,
you can type the entire line of code without taking your hands out of
home row position and you do not need to toggle off the layer after
each symbol is pressed, only immediately before keying the symbol.

The exact behavior of the layer sticky cycle function is defined as
follows for each state:
1) One time down (set on key press) - The layer was not active and the
key has been pressed but not yet released. The layer is pushed in the
one time down state.
2) One time up (set on key release) - The layer was active when the
layer sticky key was released. If a key on this layer (not set to
transparent) was pressed before the key was released, the layer will be
popped. If a non-transparent key was not pressed, the layer is popped
and pushed again in the one time up state.
3) Locked (set on key press) - The layer was active and in the one time
up state when the layer sticky key was pressed again. The layer will be
popped if the function is invoked on a subsequent keypress.
2013-04-08 00:49:35 -07:00
Ben Blazak 8ea3ea5230 fixed layout bug ('period' on numpad layer)
'_dec_kp' (the keydoce for keypad decimal) doesn't appear to work...
2012-12-20 00:22:06 -08:00
Ben Blazak 0f474132f5 fixed layer bug 2012-12-11 17:20:42 -08:00
Ben Blazak b102e2bd4f updated toplevel build script :)
- also fixed a small error in the colmak layout, which was there because
  it had been in the qwerty and dvorak layouts until *very* recently.
2012-12-11 16:39:27 -08:00
Ben Blazak a6846f7e68 Merge branch 'master' of git://github.com/jjt/ergodox-firmware into dev
------- jjt -------
I increased the spacing of the layout sections and made all layers follow the
spacing for consistency.

I also made changes to the positions of the layer keys, added a number symbol
row on layer 1 (I found it easier to reach) and made a QWERTY layer, mostly for
gaming. And I switched the primary thumb buttons, also for gaming.
-------------------
2012-12-11 15:32:16 -08:00
Ben Blazak 63f1ee22df improved the svg/html layout description generator output 2012-12-11 15:10:45 -08:00
Jason Trill ba158565dc Converted tabs to spaces 2012-12-11 13:51:16 -08:00
Jason Trill c122a67db9 Added Colemak layout 2012-12-11 13:30:06 -08:00
Ben Blazak 8d3d17bb20 rotated the layout and matrix thumb groups 90 deg.
- per a suggestion from Jason Trill (jjt on github); after looking at it
  a while, i think it is a bit more natural.. :)
2012-12-11 11:01:18 -08:00
Ben Blazak 371ffad691 rotated the layout and matrix thumb groups 90 deg.
- per a suggestion from Jason Trill (jjt on github); after looking at it
  a while, i think it is a bit more natural.. :)
2012-12-11 10:50:47 -08:00
Ben Blazak 4c2cc8e5e9 updating documentation :)
(and a few minor changes)
2012-12-10 18:30:39 -08:00
Ben Blazak 27569dbb74 added dvorak layout (modified from the QWERTY one) 2012-12-06 12:24:41 -08:00
Ben Blazak 51e81d0b1c layout modifications
- and added a 'shift+press|release' kbfun
2012-12-04 16:11:01 -08:00
Ben Blazak 1b41491115 fixed layer and numpad bugs - appears to work!
- rewrote the layer functions in main() (easiest way to get the to
  work.. :) )
- fixed the keymap (i had the numpad keys pushing layer 2 instead of
  layer 3)
- changed the numlock keycode.. i was using the wrong one, lol
- and some minor aesthetic changes
2012-12-03 16:19:12 -08:00
Ben Blazak 52200b262f added a keyboard function layer; fixed small layer bug 2012-11-30 16:28:40 -08:00
Ben Blazak 7fa2155e05 changed the way layers are handled
note: NOT YET TESTED, only compiled
2012-11-30 12:06:41 -08:00
Ben Blazak dacc54fa1a layout/qwerty -> layout/qwerty-kinesis-mod
- NOT TESTED YET. still need to do that
- also, got an idea for layer masking...

possible future changes:
- i'd like to make the layer matrices just '_kb_layout_values', and
  '_kb_layout_functions'.
- i'd like to make layer masks implemented with a special function
  'kbfun_layermask_transparent' or something similar.  a function that
  looks up what would have been pressed if that layer wasn't active.
  they could be chainable, i.e. a lookup for such a function could end
  up calling the same function (if two layermasks were active on top of
  on another), which would then call a real key.  these wouldn't be
  allowed on the base layer, of course...  and then, all i'd have to do
  to keep track of layers would be keep a variable length array (or
  not...  maybe an array of length 10 or something) of which layer is
  active... :)
- i'd like to have a thing (this isn't a very complete thought yet)
  where keypresses are looked up first in the EEPROM, to see if there's
  a definition there.  if there isn't (which should usually be the case)
  then the standard definition for that key from the matrices would be
  used.  this would allow macros (and redefinitions) without reflashing.
  this would also be convenient, once the mechanism was implemented, for
  assigning keys multiple decomposable actions...  dunno exactly how
  it'll work out yet though.  layer stuff comes first.
2012-10-16 16:54:03 -07:00
Ben Blazak 467886299b made LED_BRIGHTNESS a makefile option 2012-10-12 10:29:50 -07:00
Ben Blazak df7bb3a7d2 working on layout graphic generator; almost there!
- also, additions to the ui-info.json file generator
- and probably some other small but useful things
2012-10-08 18:01:06 -07:00
Ben Blazak c330126076 misc; now compiling in os x
- also starting work on a new build script (to make an svg of the
  current layout, so it's easier to visualize)
2012-10-07 00:18:59 -07:00
Ben Blazak fe603948a9 wrote the ui-info generating script for Ben (aka OrangeJewce)
- also changed the kbfun function comments to be easier to parse
- also added running the generating script to the toplevel build process
2012-08-23 01:31:25 -07:00
Ben Blazak ee6481d97d (modified TODO) 2012-08-19 21:36:54 -07:00
Ben Blazak 10c1ef23c5 (adding options.h; somehow it got lost before...) 2012-08-19 21:35:44 -07:00
Ben Blazak b11d8780d9 updated matrix to match PCB; made pin direction an option
- rows are now 0..6, cols now 0..D (matching the pics Fredrik posted of
  his first flippable PCB)
- either rows or columns can now be the driving pins.  the option is in
  ".../keyboard/.../options.h"
2012-08-19 21:16:52 -07:00
Ben Blazak ff1708796b (changed the name of a header) 2012-08-19 13:42:43 -07:00
Ben Blazak 6e094a86d5 (updated TODO) 2012-08-11 17:14:57 -07:00
Ben Blazak a0fca378d5 (modified TODO) 2012-08-07 19:15:10 -07:00
Ben Blazak d7c1ffe0c4 removed linked lists; changed KBFUN_FUNCTION_ARGS handling
- linked lists need to be rewritten to be more memory efficient
- all kbfun functions are now of type `(void kbfun_...(void))`, and the
  arguments they need are passed via a group of global `main_arg_...`
  variables (and other `main_...` variables)
2012-08-06 15:57:23 -07:00
Ben Blazak ddade5b5dc reorganization (large one) (mostly moving files) 2012-07-31 14:48:31 -07:00
Ben Blazak f9b46c32bf (small doc change) 2012-07-22 21:08:01 -07:00
Ben Blazak 3328f02a62 modified for flippable PCB (as of 2012-07-15) 2012-07-22 19:30:20 -07:00
Ben Blazak 9e7af882a4 finished linked lists in lib!
and moved the header for common data types (from lib/data-types.h to
lib/data-types/common.h)
2012-07-16 18:45:04 -07:00
Ben Blazak 813569cfe0 updated toplevel license and readme
- new ergodox website
- clarification in licence indicating that parts of the project may not
  be under that license/copyright
  - currently the stuff in src/lib, and soon the stuff in contrib,
    (are|will be) under different copyrights, and possibly different
    licenses.
  - also, just so it's written down somewhere: some of my documentation
    may be considered derivative works of the specs|docs i was taking
    things from, but i hope i'm safe (fair use?).  i tried to make clear
    in each file where i got stuff though.
2012-07-15 17:45:58 -07:00
Ben Blazak b8224d25de updated USB vendor and product IDs 2012-07-15 17:16:15 -07:00
Ben Blazak a31b0fa507 modified docs a little about row/col assignments
and linked-list stuff still in progress
2012-07-11 16:06:08 -07:00
Ben Blazak 018b763423 changed numpad functions; linked-lists, etc. in progress
- the numpad functions are reorganized, and there are more of them now,
  so the numpad can be treated either as something that's toggled or
  something that's locked
- the numpad functions may need to be split into a separate file, to
  keep things pretty.  i'll look into it later.
- the linked-list functions are being written so that hopefully i can
  change the concept of how layers (with transitions and masking) are
  handled.  they're incomplete in this check in because i took a break
  to fix the numpad functions for dox
2012-07-08 17:54:23 -07:00
Ben Blazak b257e21a15 working on linked-lists (going to remove some functions) 2012-07-07 21:49:47 -07:00
Ben Blazak 4c23dbaf59 updated the ergodox circuit diagram svg 2012-07-06 01:52:54 -07:00
Ben Blazak ea56a08981 added linked lists in lib/data-types 2012-07-06 00:35:01 -07:00
Ben Blazak d4b9d88464 added a jump to bootloader key-function 2012-07-05 17:10:18 -07:00
Ben Blazak 039aba752b added numpad (and a private key-function for layer masking)
tested on breadboard.  appears to work!
2012-07-05 15:48:18 -07:00
Ben Blazak 6e087c7dd4 removed `kbfun_layer_set()` since it was redundant
it had no effective difference from `kbfun_layer_inc()`, because values
in the keycode matrix can only be positive (of type uint8_t)
2012-06-22 17:43:12 -07:00
Ben Blazak 49e3b5208a (small bug/typo fix) 2012-06-21 22:09:26 -07:00
Ben Blazak 06bfe3c037 separated kbfun_layer_inc_exec() and ...dec_exec()
also added another layer to _kb_layout_release[][][], mostly NULL, but
including at least one of each available kbfun*().  this way, all the
functions appear to be used, and none of them get optimised out by the
compiler
2012-06-21 20:42:56 -07:00
Ben Blazak d1fa583bb3 mostly kbfun*() changes and additions
- changed KBFUN_FUNCTION_ARGS again

- changed kbfun's
  - condensed `kbfun_press()` and `kbfun_release()` to `kbfun_press_release()`
  - added `kbfun_toggle()`, which toggles keycodes on or off
  - added `kbfun_layer_inc_dec_press_release()` which is like
    ...press_release(), except it increments the layer first (and
    decrements it on keyrelease)
  - added `_kbfun_exec_key()` (which is a public kbfun*(), but not for
    assignment to keycodes) for convenience.  used by main(), and
    currently 1 of the kbfun*()s.  it doesn't save a lot of code, but i
    think it makes things slightly easier to read.  not quite as elegant
    a solution as i'd like, but it might have to do

- changed keymap accordingly

- changed main()
  - now using `_kbfun_exec_key()` (instead of essentially inlining the code)
  - now sending the USB report once every cycle.  i was sending once for
    every keypress (lol, by mistake: what i meant to do was only send it
    if any keys had been pressed).
2012-06-20 16:56:24 -07:00
Ben Blazak 9f357ede2a ((removed something i'd forgotten)) 2012-06-16 23:21:20 -07:00
Ben Blazak 33b6cf6f47 (reverting after test)
i did want to save the test code though
2012-06-15 16:50:02 -07:00
Ben Blazak fe545d83d6 test: using indices to an array of fn ptrs in layout matrices
so that _kb_layout_press... and ...release... are of type uint8_t
instead of kbfun_funptr_t (saving 1 byte per key per layer per matrix =
40% of the total layout size).

this brings the total firmware size with 10 layers to 6574 bytes instead
of 8302 bytes.  the teensy 2.0 has 32256 bytes of flash.

i'm going to revert to the old way.  partly because the space savings
don't seem consequential compared to what we have to work with.  mostly
because doing it with an array separates the function pointer to macro
(or const var) correlation in qwerty.c, and because i then have to
extern the _kb_layout_functions[6] array in layout.h (or qwerty.h).

also, using an enum instead of macros with manually assigned numbers
corresponding to the array indices would be more error prone, i think,
because (since it has to be visible outside qwerty.c) it would have to
be declared in a header.

hopefully all that makes sense.  i'm in a bit of a hurry.  but look at
the code: i think, even with a bit of formatting help, it'd still look
less clean
2012-06-15 16:39:33 -07:00
Ben Blazak 068a3546f6 bug fixes, mostly; and other things
- addition to references.md

- keymap modification
  - now using 2 shifts => capslock
  - the previous capslock key -> tab
  - the previous tab key -> left bracket

- bug and omission fixes; notably:
  - _is_pressed() no longer changes the value of
    `keyboard_modifier_keys`, lol
  - kbfun_2_keys_capslock_press_release() now works.  (capslock doesn't
    register if left or right shift is pressed, so the shift state has
    to be stored, cleared, capslock pressed, and shift state restored)
  - main() no longer locally overwrites the value of `current_layer`
    before sending it to the kbfun.  (i didn't realize i was using the
    same variable name for two different things)

- improvements
  - kbfun_layer_inc() and ...dec() are now variable
2012-06-15 14:36:50 -07:00
Ben Blazak d1f17133c9 added lib/key-functions private header 2012-06-14 22:03:47 -07:00
Ben Blazak 28e198ee72 added set layer function; more lib/keyfunctions* changes 2012-06-14 22:02:57 -07:00
Ben Blazak 223f03ac74 wrote kbfun for 2 shifts => capslock; other kbfun mods 2012-06-14 16:01:34 -07:00
Ben Blazak 7404ca3c02 (changed low level led macro names) 2012-06-14 11:38:49 -07:00
Ben Blazak 973cac3240 (more makefile modifications) 2012-06-12 16:11:18 -07:00
Ben Blazak 5260e7104d modified how dist is build; changed .gitignore hierarchy
there is now a toplevel makefile for making dist, so that we can keep
the project build systems separate (in src and contrib/UI*), and then
build dist from the root dir
2012-06-12 14:12:50 -07:00
Ben Blazak e37ff92137 makefile now generates a .map 2012-06-11 16:11:56 -07:00
Ben Blazak 3322844ed0 bugfix (mostly): changed the way layers are handled
before, if you pressed a key, then shifted layers, then released it, the
first layer's press() would be called, and the 2nd layer's release()
would be called, causing keys to stick, and probably other errors.  now,
the layer that the key was on when it was pressed is kept track of, and
the proper release() is called.

also, layers can be shifted per key now, instead of just for the whole
board at once

i also changed how keyboard-private includes are handled.  "private"
stuff is now in its own file, instead of being nested in an extra
`#ifdef`.

and i think that's it.  i'm pretty tired right now, so there may be
errors, but it seemed to work all right with cursory tests.
2012-06-11 03:27:34 -07:00
Ben Blazak 5569cecd2b changed default number of layers to 10 2012-06-10 20:53:21 -07:00
Ben Blazak 471a92834c starting some changes on layer handling and key functions 2012-06-10 20:48:24 -07:00
Ben Blazak f5bd07c45c added convenience target 'dist-hex' to makefile 2012-06-04 00:09:15 -07:00
Ben Blazak bdcd4484be added a layout layer; layout's still kind of a mess...
layout includes function keys, some symbols, and a few things from the
default layer
2012-06-03 23:46:21 -07:00
Ben Blazak c30106431b (forgot to include <util/delay.h>) 2012-06-03 21:25:50 -07:00
Ben Blazak d27b162400 bugfix: add delay between teensy col write and pin read
without this we have ghosting problems on the bottommost keys of the
teensy side

thanks to hasu (on geekhack) for the suggestion, and PrinsValium for
confirming erratic behavior with his firmware without these delays.
thanks DOX for making the changes and trying it out.  i'm just adding it
to the repo.
2012-06-03 21:12:15 -07:00
Ben Blazak 71bf4204e9 (small update to a comment) 2012-06-01 21:12:52 -07:00
Ben Blazak 9c86906f7f abstracted led handling -- PCB changes done
- added high-level (logical) led macros, so that the top level firmware
  doens't need to know what numbers leds are (or how many there are)
- left low-level (processor specific) led macros in
  keyboard/.../teensy-2-0.h , where they were
- put non processor|layout specific led macros in keyboard/.../led.h
- put layout specific led macros into keyboard/.../layout/*.h (with
  default empty macro definitions in keyboard/.../layout.h)

also
- cleaned up some typos and such
- moved the debounce time macro to 'keyboard/ergodox.h', since it's
  technically keyboard (keyswitch) specific

aggregate changes for PCB update
- documentation updated to reflect that the columns are now the driving
  pins, and the columns are the read pins.  both are still treated as
  open drain.
- macros for led pins 1 and 2 were swapped
- update functions now cycle through columns->low, read rows
- added a matrix macro to map from how we want the key layouts
  represented, to how things are scanned into the matrix
2012-06-01 01:05:38 -07:00
Ben Blazak 4972c81a96 updated matrix and layout stuff for dox's PCB 2012-05-29 16:53:55 -07:00
Ben Blazak a28b1f1182 updated mcp23018 stuff for dox's PCB 2012-05-26 23:12:01 -07:00
Ben Blazak 1af2423364 updated teensy stuff for dox's PCB 2012-05-26 22:50:33 -07:00
Ben Blazak 50998376c5 (still reading hid stuff; taking a break to update matrix)
dox posted the PCB render the other day.  also, i have the current
flowing the wrong way for the keyswitch diodes to work right now
2012-05-26 20:48:20 -07:00
Ben Blazak 22752fead8 finished section 9 of the usb spec! 2012-05-13 18:06:17 -07:00
Ben Blazak 1acaaaf5ff (intermediate checkin: working on new usb code)
(plus a few small aesthetic things in /src/keyboard.  i changed some
function like macros to lower-case, because someday they might be
implemented as real functions... and there's no real reason to
distinguish between functions and function like macros in the main() and
other higher level code.  at least that's what it seems like to me right
now.)
2012-05-06 18:36:51 -07:00