less nesting
parent
c1cd739af2
commit
dea913d16e
|
@ -5,7 +5,7 @@
|
|||
|
||||
# require "muflax"
|
||||
|
||||
LayoutDir = "src/keyboard/ergodox/layout"
|
||||
LayoutDir = "src/keyboard/layout"
|
||||
LayoutFile = "#{LayoutDir}/saneo-mod.c"
|
||||
|
||||
puts "generating #{LayoutFile}..."
|
||||
|
@ -225,9 +225,9 @@ class Layout
|
|||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#include "../../../lib/data-types/misc.h"
|
||||
#include "../../../lib/usb/usage-page/keyboard.h"
|
||||
#include "../../../lib/key-functions/public.h"
|
||||
#include "../../lib/data-types/misc.h"
|
||||
#include "../../lib/usb/usage-page/keyboard.h"
|
||||
#include "../../lib/key-functions/public.h"
|
||||
#include "../matrix.h"
|
||||
#include "../layout.h"
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 158 KiB |
|
@ -10,7 +10,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <util/twi.h>
|
||||
#include "../../../lib/teensy-2-0.h" // `TWI_FREQ` defined in "teensy-2-0.c"
|
||||
#include "../../lib/teensy-2-0.h" // `TWI_FREQ` defined in "teensy-2-0.c"
|
||||
#include "../options.h"
|
||||
#include "../matrix.h"
|
||||
#include "./mcp23018--functions.h"
|
|
@ -7,14 +7,14 @@
|
|||
* ------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
// for "lib/teensy-2-0.h"
|
||||
// for "lib/twi.h"
|
||||
#define TWI_FREQ 400000
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
#include "../../../lib/teensy-2-0.h"
|
||||
#include "../../lib/teensy-2-0.h"
|
||||
#include "../options.h"
|
||||
#include "../matrix.h"
|
||||
#include "./teensy-2-0--functions.h"
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#include "../../../lib/data-types/misc.h"
|
||||
#include "../../../lib/key-functions/public.h"
|
||||
#include "../../lib/data-types/misc.h"
|
||||
#include "../../lib/key-functions/public.h"
|
||||
#include "../matrix.h"
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
@ -78,4 +78,3 @@
|
|||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -4,9 +4,9 @@
|
|||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#include "../../../lib/data-types/misc.h"
|
||||
#include "../../../lib/usb/usage-page/keyboard.h"
|
||||
#include "../../../lib/key-functions/public.h"
|
||||
#include "../../lib/data-types/misc.h"
|
||||
#include "../../lib/usb/usage-page/keyboard.h"
|
||||
#include "../../lib/key-functions/public.h"
|
||||
#include "../matrix.h"
|
||||
#include "../layout.h"
|
||||
// ----------------------------------------------------------------------------
|
|
@ -10,8 +10,8 @@
|
|||
#include <stdint.h>
|
||||
#include "../../lib-other/pjrc/usb_keyboard/usb_keyboard.h"
|
||||
#include "../../lib/usb/usage-page/keyboard.h"
|
||||
#include "../../keyboard/ergodox/layout.h"
|
||||
#include "../../keyboard/ergodox/matrix.h"
|
||||
#include "../../keyboard/layout.h"
|
||||
#include "../../keyboard/matrix.h"
|
||||
#include "../../main.h"
|
||||
#include "./public.h"
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "../../keyboard/ergodox/matrix.h"
|
||||
#include "../../keyboard/matrix.h"
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
|
||||
#include "../../../main.h"
|
||||
#include "../../../keyboard/ergodox/layout.h"
|
||||
#include "../../../keyboard/layout.h"
|
||||
#include "../public.h"
|
||||
#include "../private.h"
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <stdint.h>
|
||||
#include "../../../lib-other/pjrc/usb_keyboard/usb_keyboard.h"
|
||||
#include "../../../lib/usb/usage-page/keyboard.h"
|
||||
#include "../../../keyboard/ergodox/layout.h"
|
||||
#include "../../../keyboard/layout.h"
|
||||
#include "../../../main.h"
|
||||
#include "../public.h"
|
||||
#include "../private.h"
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
#include <util/delay.h>
|
||||
#include "./lib-other/pjrc/usb_keyboard/usb_keyboard.h"
|
||||
#include "./lib/key-functions/public.h"
|
||||
#include "./keyboard/ergodox/controller.h"
|
||||
#include "./keyboard/ergodox/layout.h"
|
||||
#include "./keyboard/ergodox/matrix.h"
|
||||
#include "./keyboard/controller.h"
|
||||
#include "./keyboard/layout.h"
|
||||
#include "./keyboard/matrix.h"
|
||||
#include "./main.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -86,7 +86,7 @@ int main(void) {
|
|||
//
|
||||
// note
|
||||
// - everything else is the key function's responsibility
|
||||
// - see the keyboard layout file ("keyboard/ergodox/layout/*.c") for
|
||||
// - see the keyboard layout file ("keyboard/layout/*.c") for
|
||||
// which key is assigned which function (per layer)
|
||||
// - see "lib/key-functions/public/*.c" for the function definitions
|
||||
for (uint8_t row=0; row<KB_ROWS; row++) {
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "keyboard/ergodox/layout.h"
|
||||
#include "keyboard/ergodox/matrix.h"
|
||||
#include "keyboard/layout.h"
|
||||
#include "keyboard/matrix.h"
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
|
10
src/makefile
10
src/makefile
|
@ -27,10 +27,9 @@ SRC := $(wildcard *.c)
|
|||
KEYBOARD := $(strip $(KEYBOARD))
|
||||
LAYOUT := $(strip $(LAYOUT))
|
||||
# --- include stuff
|
||||
SRC += $(wildcard keyboard/$(KEYBOARD)*.c)
|
||||
SRC += $(wildcard keyboard/$(KEYBOARD)/*.c)
|
||||
SRC += $(wildcard keyboard/$(KEYBOARD)/controller/*.c)
|
||||
SRC += $(wildcard keyboard/$(KEYBOARD)/layout/$(LAYOUT)*.c)
|
||||
SRC += $(wildcard keyboard/*.c)
|
||||
SRC += $(wildcard keyboard/controller/*.c)
|
||||
SRC += $(wildcard keyboard/layout/$(LAYOUT)*.c)
|
||||
# library stuff
|
||||
# - should be last in the list of files to compile, in case there are default
|
||||
# macros that have to be overridden in other source files
|
||||
|
@ -153,9 +152,8 @@ clean:
|
|||
%.o: %.c
|
||||
@echo
|
||||
@echo --- making $@ ---
|
||||
$(CC) -c $(strip $(CFLAGS)) $(strip $(GENDEPFLAGS)) $< -o $@
|
||||
$(CC) -c $(strip $(CFLAGS)) $(strip $(GENDEPFLAGS)) $< -o $@
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
-include $(OBJ:%=%.dep)
|
||||
|
||||
|
|
Loading…
Reference in New Issue