reorganized src/lib

partial-rewrite
Ben Blazak 2012-04-22 12:08:32 -07:00
parent 502fa3a79f
commit bec0c7244f
24 changed files with 36 additions and 28 deletions

View File

@ -7,10 +7,9 @@
* ------------------------------------------------------------------------- */ * ------------------------------------------------------------------------- */
#include "lib-other/pjrc/usb_keyboard/usb_keyboard.h" #include "lib/pjrc/usb_keyboard/usb_keyboard.h"
#include "lib/_data-types.h"
#include "lib/data-types.h" #include "lib/_usb/keyboard-usage-page.h"
#include "lib/usb/keyboard-usage-page.h"
#include "keyboard.h" #include "keyboard.h"

View File

@ -10,7 +10,7 @@
#ifndef KEY_FUNCTIONS_h #ifndef KEY_FUNCTIONS_h
#define KEY_FUNCTIONS_h #define KEY_FUNCTIONS_h
#include "lib/data-types.h" #include "lib/_data-types.h"
typedef void (*kbfun_funptr_t)(uint8_t*, uint8_t*, uint8_t*, uint8_t*); typedef void (*kbfun_funptr_t)(uint8_t*, uint8_t*, uint8_t*, uint8_t*);

View File

@ -7,7 +7,7 @@
* ------------------------------------------------------------------------- */ * ------------------------------------------------------------------------- */
#include "lib/data-types.h" #include "lib/_data-types.h"
#define KEYBOARD_INCLUDE_PRIVATE #define KEYBOARD_INCLUDE_PRIVATE
#include "ergodox/matrix.h" #include "ergodox/matrix.h"

View File

@ -11,7 +11,7 @@
#ifndef ERGODOX_h #ifndef ERGODOX_h
#define ERGODOX_h #define ERGODOX_h
#include "lib/data-types.h" #include "lib/_data-types.h"
#include "ergodox/layout.h" // number of layers, layout #include "ergodox/layout.h" // number of layers, layout
#include "ergodox/matrix.h" // kb dimensions, matrix status #include "ergodox/matrix.h" // kb dimensions, matrix status

View File

@ -7,8 +7,8 @@
* ------------------------------------------------------------------------- */ * ------------------------------------------------------------------------- */
#include "lib/data-types.h" #include "lib/_data-types.h"
#include "lib/usb/keyboard-usage-page.h" #include "lib/_usb/keyboard-usage-page.h"
#include "key-functions.h" #include "key-functions.h"

View File

@ -9,7 +9,7 @@
#ifndef LAYOUT_h #ifndef LAYOUT_h
#define LAYOUT_h #define LAYOUT_h
#include "lib/data-types.h" #include "lib/_data-types.h"
#include "key-functions.h" #include "key-functions.h"

View File

@ -7,7 +7,7 @@
* ------------------------------------------------------------------------- */ * ------------------------------------------------------------------------- */
#include "lib/data-types.h" #include "lib/_data-types.h"
#include "matrix.h" #include "matrix.h"

View File

@ -10,7 +10,7 @@
#ifndef MATRIX_h #ifndef MATRIX_h
#define MATRIX_h #define MATRIX_h
#include "lib/data-types.h" #include "lib/_data-types.h"
#define KB_ROWS 12 // must match real life #define KB_ROWS 12 // must match real life
#define KB_COLUMNS 7 // must match real life #define KB_COLUMNS 7 // must match real life

View File

@ -9,8 +9,8 @@
#include <util/twi.h> #include <util/twi.h>
#include "lib/data-types.h" #include "lib/_data-types.h"
#include "lib/teensy-2-0/twi.h" // `TWI_FREQ` defined in "teensy-2-0.c" #include "lib/_teensy-2-0/twi.h" // `TWI_FREQ` defined in "teensy-2-0.c"
#define KEYBOARD_INCLUDE_PRIVATE #define KEYBOARD_INCLUDE_PRIVATE
#include "matrix.h" #include "matrix.h"

View File

@ -10,7 +10,7 @@
#ifndef MCP23018_h #ifndef MCP23018_h
#define MCP23018_h #define MCP23018_h
#include "lib/data-types.h" #include "lib/_data-types.h"
#ifdef KEYBOARD_INCLUDE_PRIVATE #ifdef KEYBOARD_INCLUDE_PRIVATE

View File

@ -9,9 +9,9 @@
#include <avr/io.h> #include <avr/io.h>
#include "lib/data-types.h" #include "lib/_data-types.h"
#define TWI_FREQ 400000 #define TWI_FREQ 400000
#include "lib/teensy-2-0/twi.h" #include "lib/_teensy-2-0/twi.h"
#define KEYBOARD_INCLUDE_PRIVATE #define KEYBOARD_INCLUDE_PRIVATE
#include "matrix.h" #include "matrix.h"

View File

@ -12,7 +12,7 @@
#include <avr/io.h> // for the register macros #include <avr/io.h> // for the register macros
#include "lib/data-types.h" #include "lib/_data-types.h"
#include "matrix.h" #include "matrix.h"

View File

@ -1,5 +1,4 @@
# src/lib-other # src/lib/pjrc
Files taken from other projects
## links to original files ## links to original files

12
src/lib/readme.md Normal file
View File

@ -0,0 +1,12 @@
# src/lib
Stuff that's generally useful
* Directories prepended by a `_` were written for (and exist solely in) this
project.
-------------------------------------------------------------------------------
Copyright &copy; 2012 Ben Blazak <benblazak.dev@gmail.com>
Released under The MIT License (MIT) (see "license.md")
Project located at <https://github.com/benblazak/ergodox-firmware>

View File

@ -10,9 +10,8 @@
#include <util/delay.h> #include <util/delay.h>
#include "lib-other/pjrc/usb_keyboard/usb_keyboard.h" #include "lib/pjrc/usb_keyboard/usb_keyboard.h"
#include "lib/_data-types.h"
#include "lib/data-types.h"
#include "keyboard.h" #include "keyboard.h"

View File

@ -19,11 +19,10 @@ FORMAT = ihex
SRC = \ SRC = \
$(wildcard *.c) \ $(wildcard *.c) \
$(wildcard keyboard/*.c) \ $(wildcard keyboard/ergodox*.c) \
$(wildcard keyboard/*/*.c) \ $(wildcard keyboard/ergodox/*.c) \
$(wildcard lib/*.c) \ $(wildcard lib/_teensy-2-0/*.c) \
$(wildcard lib/*/*.c) \ $(wildcard lib/pjrc/usb_keyboard/*.c)
lib-other/pjrc/usb_keyboard/usb_keyboard.c
OBJ = $(SRC:%.c=%.o) OBJ = $(SRC:%.c=%.o)