Browse Source

infinity: Add initial files for keyboard support

core
Jun Wako 9 years ago
parent
commit
9218133d0b
5 changed files with 22 additions and 5 deletions
  1. 2
    0
      README.md
  2. 8
    1
      common/matrix.h
  3. 5
    0
      common/mbed/xprintf.cpp
  4. 1
    0
      tool/mbed/lpc11u35_501.mk
  5. 6
    4
      tool/mbed/mbed.mk

+ 2
- 0
README.md View File

@@ -53,6 +53,7 @@ You can find some keyboard specific projects under `converter` and `keyboard` di
* [macway](keyboard/macway/) - [Compact keyboard mod][GH_macway] [retired]
* [KMAC](keyboard/kmac/) - Korean custom keyboard
* [Lightsaber](keyboard/lightsaber/) - Korean custom keyboard
* [Infinity](keyboard/infinity/) - Massdrop [Infinity keyboard][Infinity]

[GH_macway]: http://geekhack.org/showwiki.php?title=Island:11930
[GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047
@@ -72,6 +73,7 @@ You can find some keyboard specific projects under `converter` and `keyboard` di
[PC98]: http://en.wikipedia.org/wiki/NEC_PC-9801
[Sun]: http://en.wikipedia.org/wiki/Sun-3
[IIGS]: http://en.wikipedia.org/wiki/Apple_IIGS
[Infinity]: https://www.massdrop.com/buy/infinity-keyboard-kit




+ 8
- 1
common/matrix.h View File

@@ -35,6 +35,10 @@ typedef uint32_t matrix_row_t;
#define MATRIX_IS_ON(row, col) (matrix_get_row(row) && (1<<col))


#ifdef __cplusplus
extern "C" {
#endif

/* number of matrix rows */
uint8_t matrix_rows(void);
/* number of matrix columns */
@@ -48,7 +52,7 @@ bool matrix_is_modified(void) __attribute__ ((deprecated));
/* whether a swtich is on */
bool matrix_is_on(uint8_t row, uint8_t col);
/* matrix state on row */
matrix_row_t matrix_get_row(uint8_t row);
matrix_row_t matrix_get_row(uint8_t row);
/* print matrix for debug */
void matrix_print(void);

@@ -57,5 +61,8 @@ void matrix_print(void);
void matrix_power_up(void);
void matrix_power_down(void);

#ifdef __cplusplus
}
#endif

#endif

+ 5
- 0
common/mbed/xprintf.cpp View File

@@ -6,6 +6,10 @@

#define STRING_STACK_LIMIT 120

//TODO
int xprintf(const char* format, ...) { return 0; }

#if 0
/* mbed Serial */
Serial ser(UART_TX, UART_RX);

@@ -44,3 +48,4 @@ int xprintf(const char* format, ...)
return r;
*/
}
#endif

+ 1
- 0
tool/mbed/lpc11u35_501.mk View File

@@ -17,6 +17,7 @@ CC_SYMBOLS = \
-D__MBED__=1

OBJECTS += \
$(OBJDIR)/libraries/USBDevice/USBDevice/USBHAL_LPC11U.o \
$(OBJDIR)/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/startup_LPC11xx.o \
$(OBJDIR)/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/cmsis_nvic.o \
$(OBJDIR)/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/system_LPC11Uxx.o \

+ 6
- 4
tool/mbed/mbed.mk View File

@@ -4,7 +4,9 @@
OBJECTS += \
$(OBJDIR)/libraries/mbed/common/gpio.o \
$(OBJDIR)/libraries/mbed/common/us_ticker_api.o \
$(OBJDIR)/libraries/mbed/common/wait_api.o
$(OBJDIR)/libraries/mbed/common/wait_api.o \
$(OBJDIR)/libraries/USBDevice/USBDevice/USBDevice.o


# $(OBJDIR)/libraries/mbed/common/assert.o \
# $(OBJDIR)/libraries/mbed/common/board.o \
@@ -75,9 +77,9 @@ INCLUDE_PATHS += \
-I$(MBED_DIR)/libraries/USBDevice/USBSerial

# TMK mbed protocol
#OBJECTS += \
# $(OBJDIR)/protocol/mbed/mbed_driver.o \
# $(OBJDIR)/protocol/mbed/HIDKeyboard.o
OBJECTS += \
$(OBJDIR)/protocol/mbed/mbed_driver.o \
$(OBJDIR)/protocol/mbed/HIDKeyboard.o

INCLUDE_PATHS += \
-I$(TMK_DIR)/protocol/mbed