Ver código fonte

Merge remote-tracking branch 'upstream/master'

Conflicts:
	common/avr/suspend.c
core
Kai Ryu 9 anos atrás
pai
commit
ee163c66ab

+ 3
- 3
.gitmodules Ver arquivo

[submodule "protocol/usb_hid/USB_Host_Shield_2.0"]
path = protocol/usb_hid/USB_Host_Shield_2.0
url = [email protected]:tmk/USB_Host_Shield_2.0.git
[submodule "protocol/lufa/LUFA-git"] [submodule "protocol/lufa/LUFA-git"]
path = protocol/lufa/LUFA-git path = protocol/lufa/LUFA-git
url = https://github.com/abcminiuser/lufa.git url = https://github.com/abcminiuser/lufa.git
[submodule "protocol/usb_hid/USB_Host_Shield_2.0"]
path = protocol/usb_hid/USB_Host_Shield_2.0
url = https://github.com/felis/USB_Host_Shield_2.0.git

+ 18
- 1
README.md Ver arquivo

* [macway](keyboard/macway/) - [Compact keyboard mod][GH_macway] [retired] * [macway](keyboard/macway/) - [Compact keyboard mod][GH_macway] [retired]
* [KMAC](keyboard/kmac/) - Korean custom keyboard * [KMAC](keyboard/kmac/) - Korean custom keyboard
* [Lightsaber](keyboard/lightsaber/) - Korean custom keyboard * [Lightsaber](keyboard/lightsaber/) - Korean custom keyboard
* [Infinity](keyboard/infinity/) - Massdrop [Infinity keyboard][Infinity]
* [NerD](keyboard/nerd/) - Korean custom keyboard
* [KittenPaw](keyboard/kitten_paw) - Custom Majestouch controller
* [Lightpad](keyboard/lightpad) - Korean custom keypad
* [ghost_squid](keyboard/ghost_squid/) - [The Ghost Squid][ghost_squid] controller for [Cooler Master QuickFire XT][cmxt]

### Extenal projects using tmk_keyboard
* [ErgoDox_cub-uanic][cub-uanic] - Split Ergonomic Keyboard [ErgoDox][ergodox_org]
* [mcdox][mcdox_tmk] - [mcdox][mcdox]



[GH_macway]: http://geekhack.org/showwiki.php?title=Island:11930 [GH_macway]: http://geekhack.org/showwiki.php?title=Island:11930
[GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047 [GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047
[PC98]: http://en.wikipedia.org/wiki/NEC_PC-9801 [PC98]: http://en.wikipedia.org/wiki/NEC_PC-9801
[Sun]: http://en.wikipedia.org/wiki/Sun-3 [Sun]: http://en.wikipedia.org/wiki/Sun-3
[IIGS]: http://en.wikipedia.org/wiki/Apple_IIGS [IIGS]: http://en.wikipedia.org/wiki/Apple_IIGS
[Infinity]: https://www.massdrop.com/buy/infinity-keyboard-kit
[ghost_squid]: http://deskthority.net/wiki/Costar_replacement_controllers#The_Ghost_Squid
[cmxt]: http://gaming.coolermaster.com/en/products/keyboards/quickfirext/
[ergodox_org]: http://ergodox.org/
[cub-uanic]: https://github.com/cub-uanic/tmk_keyboard/tree/master/keyboard/ergodox
[mcdox]: https://github.com/DavidMcEwan/mcdox
[mcdox_tmk]: https://github.com/DavidMcEwan/tmk_keyboard/tree/master/keyboard/mcdox








Other Keyboard Firmware Projects Other Keyboard Firmware Projects
------------------ ------------------
See [doc/other_projects.md](doc/other_projects.md).
You can learn a lot about keyboard firmware from these. See [doc/other_projects.md](doc/other_projects.md).

+ 16
- 10
common/avr/suspend.c Ver arquivo

#include "softpwm_led.h" #include "softpwm_led.h"
#include "suspend_avr.h" #include "suspend_avr.h"
#include "suspend.h" #include "suspend.h"
#include "timer.h"
#ifdef PROTOCOL_LUFA #ifdef PROTOCOL_LUFA
#include "lufa.h" #include "lufa.h"
#endif #endif
* WDTO_4S * WDTO_4S
* WDTO_8S * WDTO_8S
*/ */
void suspend_power_down(uint8_t wdto)
static uint8_t wdt_timeout = 0;
static void power_down(uint8_t wdto)
{ {
#ifdef PROTOCOL_LUFA #ifdef PROTOCOL_LUFA
if (USB_DeviceState == DEVICE_STATE_Configured) return; if (USB_DeviceState == DEVICE_STATE_Configured) return;
#endif #endif
wdt_timeout = wdto;


// Watchdog Interrupt Mode // Watchdog Interrupt Mode
wdt_intr_enable(wdto); wdt_intr_enable(wdto);
wdt_disable(); wdt_disable();
} }


void suspend_power_down(void)
{
power_down(WDTO_15MS);
}

bool suspend_wakeup_condition(void) bool suspend_wakeup_condition(void)
{ {
matrix_power_up(); matrix_power_up();
/* watchdog timeout */ /* watchdog timeout */
ISR(WDT_vect) ISR(WDT_vect)
{ {
/* wakeup from MCU sleep mode */
/*
// blink LED
static uint8_t led_state = 0;
static uint8_t led_count = 0;
led_count++;
if ((led_count & 0x07) == 0) {
led_set((led_state ^= (1<<USB_LED_CAPS_LOCK)));
// compensate timer for sleep
switch (wdt_timeout) {
case WDTO_15MS:
timer_count += 15 + 2; // WDTO_15MS + 2(from observation)
break;
default:
;
} }
*/
} }
#endif #endif



+ 7
- 6
common/command.c Ver arquivo

case KC_CAPSLOCK: case KC_CAPSLOCK:
if (host_get_driver()) { if (host_get_driver()) {
host_driver = host_get_driver(); host_driver = host_get_driver();
clear_keyboard();
host_set_driver(0); host_set_driver(0);
print("Locked.\n"); print("Locked.\n");
} else { } else {
#endif #endif
" " STR(BOOTLOADER_SIZE) "\n"); " " STR(BOOTLOADER_SIZE) "\n");


print("GCC: " STR(__GNUC__) "." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__)
print("GCC: " STR(__GNUC__) "." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__)
" AVR-LIBC: " __AVR_LIBC_VERSION_STRING__ " AVR-LIBC: " __AVR_LIBC_VERSION_STRING__
" AVR_ARCH: avr" STR(__AVR_ARCH__) "\n"); " AVR_ARCH: avr" STR(__AVR_ARCH__) "\n");
break; break;
print("4: select mk_time_to_max\n"); print("4: select mk_time_to_max\n");
print("5: select mk_wheel_max_speed\n"); print("5: select mk_wheel_max_speed\n");
print("6: select mk_wheel_time_to_max\n"); print("6: select mk_wheel_time_to_max\n");
print("p: print prameters\n");
print("p: print parameters\n");
print("d: set default values\n"); print("d: set default values\n");
print("up: increase prameters(+1)\n");
print("down: decrease prameters(-1)\n");
print("pgup: increase prameters(+10)\n");
print("pgdown: decrease prameters(-10)\n");
print("up: increase parameters(+1)\n");
print("down: decrease parameters(-1)\n");
print("pgup: increase parameters(+10)\n");
print("pgdown: decrease parameters(-10)\n");
print("\nspeed = delta * max_speed * (repeat / time_to_max)\n"); print("\nspeed = delta * max_speed * (repeat / time_to_max)\n");
print("where delta: cursor="); pdec(MOUSEKEY_MOVE_DELTA); print("where delta: cursor="); pdec(MOUSEKEY_MOVE_DELTA);
print(", wheel="); pdec(MOUSEKEY_WHEEL_DELTA); print("\n"); print(", wheel="); pdec(MOUSEKEY_WHEEL_DELTA); print("\n");

+ 7
- 3
common/keycode.h Ver arquivo

along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */


/*
/*
* Keycodes based on HID Usage Keyboard/Keypad Page(0x07) plus special codes * Keycodes based on HID Usage Keyboard/Keypad Page(0x07) plus special codes
* http://www.usb.org/developers/devclass_docs/Hut1_12.pdf * http://www.usb.org/developers/devclass_docs/Hut1_12.pdf
*/ */
#define KC_VOLD KC_AUDIO_VOL_DOWN #define KC_VOLD KC_AUDIO_VOL_DOWN
#define KC_MNXT KC_MEDIA_NEXT_TRACK #define KC_MNXT KC_MEDIA_NEXT_TRACK
#define KC_MPRV KC_MEDIA_PREV_TRACK #define KC_MPRV KC_MEDIA_PREV_TRACK
#define KC_MFFD KC_MEDIA_FAST_FORWARD
#define KC_MRWD KC_MEDIA_REWIND
#define KC_MSTP KC_MEDIA_STOP #define KC_MSTP KC_MEDIA_STOP
#define KC_MPLY KC_MEDIA_PLAY_PAUSE #define KC_MPLY KC_MEDIA_PLAY_PAUSE
#define KC_MSEL KC_MEDIA_SELECT #define KC_MSEL KC_MEDIA_SELECT
KC_RALT, KC_RALT,
KC_RGUI, KC_RGUI,


/* NOTE: 0xE8-FF are used for internal special purpose */
/* NOTE: 0xE8-FF are used for internal special purpose */
}; };


/* Special keycodes */ /* Special keycodes */
KC_WWW_FORWARD, KC_WWW_FORWARD,
KC_WWW_STOP, KC_WWW_STOP,
KC_WWW_REFRESH, KC_WWW_REFRESH,
KC_WWW_FAVORITES, /* 0xBA */
KC_WWW_FAVORITES,
KC_MEDIA_FAST_FORWARD,
KC_MEDIA_REWIND, /* 0xBC */


/* Fn key */ /* Fn key */
KC_FN0 = 0xC0, KC_FN0 = 0xC0,

+ 8
- 1
common/matrix.h Ver arquivo

#define MATRIX_IS_ON(row, col) (matrix_get_row(row) && (1<<col)) #define MATRIX_IS_ON(row, col) (matrix_get_row(row) && (1<<col))




#ifdef __cplusplus
extern "C" {
#endif

/* number of matrix rows */ /* number of matrix rows */
uint8_t matrix_rows(void); uint8_t matrix_rows(void);
/* number of matrix columns */ /* number of matrix columns */
/* whether a swtich is on */ /* whether a swtich is on */
bool matrix_is_on(uint8_t row, uint8_t col); bool matrix_is_on(uint8_t row, uint8_t col);
/* matrix state on row */ /* 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 */ /* print matrix for debug */
void matrix_print(void); void matrix_print(void);


void matrix_power_up(void); void matrix_power_up(void);
void matrix_power_down(void); void matrix_power_down(void);


#ifdef __cplusplus
}
#endif


#endif #endif

+ 5
- 0
common/mbed/xprintf.cpp Ver arquivo



#define STRING_STACK_LIMIT 120 #define STRING_STACK_LIMIT 120


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

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


return r; return r;
*/ */
} }
#endif

+ 10
- 2
common/print.c Ver arquivo

* THE SOFTWARE. * THE SOFTWARE.
*/ */


#include <avr/io.h>
#include <avr/pgmspace.h>
#include <stdint.h>
#include "print.h" #include "print.h"




#ifndef NO_PRINT #ifndef NO_PRINT


#if defined(__AVR__)

#define sendchar(c) xputc(c) #define sendchar(c) xputc(c)




xdev_out(sendchar_func); xdev_out(sendchar_func);
} }


#elif defined(__arm__)

// TODO
//void print_set_sendchar(int8_t (*sendchar_func)(uint8_t)) { }

#endif

#endif #endif

+ 0
- 5
common/print.h Ver arquivo

#if defined(__AVR__) #if defined(__AVR__)


#include "avr/xprintf.h" #include "avr/xprintf.h"


// TODO: avoid collision with arduino/Print.h
#ifndef __cplusplus
#define print(s) xputs(PSTR(s)) #define print(s) xputs(PSTR(s))
#endif
#define println(s) xputs(PSTR(s "\r\n")) #define println(s) xputs(PSTR(s "\r\n"))


#ifdef __cplusplus #ifdef __cplusplus

+ 4
- 1
common/report.h Ver arquivo

/* supplement for Bluegiga iWRAP HID(not supported by Windows?) */ /* supplement for Bluegiga iWRAP HID(not supported by Windows?) */
#define AL_LOCK 0x019E #define AL_LOCK 0x019E
#define TRANSPORT_RECORD 0x00B2 #define TRANSPORT_RECORD 0x00B2
#define TRANSPORT_FAST_FORWARD 0x00B3
#define TRANSPORT_REWIND 0x00B4 #define TRANSPORT_REWIND 0x00B4
#define TRANSPORT_EJECT 0x00B8 #define TRANSPORT_EJECT 0x00B8
#define AC_MINIMIZE 0x0206 #define AC_MINIMIZE 0x0206
(key == KC_AUDIO_VOL_DOWN ? AUDIO_VOL_DOWN : \ (key == KC_AUDIO_VOL_DOWN ? AUDIO_VOL_DOWN : \
(key == KC_MEDIA_NEXT_TRACK ? TRANSPORT_NEXT_TRACK : \ (key == KC_MEDIA_NEXT_TRACK ? TRANSPORT_NEXT_TRACK : \
(key == KC_MEDIA_PREV_TRACK ? TRANSPORT_PREV_TRACK : \ (key == KC_MEDIA_PREV_TRACK ? TRANSPORT_PREV_TRACK : \
(key == KC_MEDIA_FAST_FORWARD ? TRANSPORT_FAST_FORWARD : \
(key == KC_MEDIA_REWIND ? TRANSPORT_REWIND : \
(key == KC_MEDIA_STOP ? TRANSPORT_STOP : \ (key == KC_MEDIA_STOP ? TRANSPORT_STOP : \
(key == KC_MEDIA_EJECT ? TRANSPORT_STOP_EJECT : \ (key == KC_MEDIA_EJECT ? TRANSPORT_STOP_EJECT : \
(key == KC_MEDIA_PLAY_PAUSE ? TRANSPORT_PLAY_PAUSE : \ (key == KC_MEDIA_PLAY_PAUSE ? TRANSPORT_PLAY_PAUSE : \
(key == KC_WWW_FORWARD ? AC_FORWARD : \ (key == KC_WWW_FORWARD ? AC_FORWARD : \
(key == KC_WWW_STOP ? AC_STOP : \ (key == KC_WWW_STOP ? AC_STOP : \
(key == KC_WWW_REFRESH ? AC_REFRESH : \ (key == KC_WWW_REFRESH ? AC_REFRESH : \
(key == KC_WWW_FAVORITES ? AC_BOOKMARKS : 0)))))))))))))))))))
(key == KC_WWW_FAVORITES ? AC_BOOKMARKS : 0)))))))))))))))))))))


#ifdef __cplusplus #ifdef __cplusplus
} }

+ 1
- 1
common/suspend.h Ver arquivo





void suspend_idle(uint8_t timeout); void suspend_idle(uint8_t timeout);
void suspend_power_down(uint8_t timeout);
void suspend_power_down(void);
bool suspend_wakeup_condition(void); bool suspend_wakeup_condition(void);
void suspend_wakeup_init(void); void suspend_wakeup_init(void);



+ 1
- 1
doc/keycode.txt Ver arquivo

KC_PSCREEN KC_PSCR 46 Keyboard PrintScreen1 KC_PSCREEN KC_PSCR 46 Keyboard PrintScreen1
KC_SCKLOCK KC_SLCK 47 Keyboard Scroll Lock11 KC_SCKLOCK KC_SLCK 47 Keyboard Scroll Lock11
KC_PAUSE KC_PAUS 48 Keyboard Pause1 KC_PAUSE KC_PAUS 48 Keyboard Pause1
KC_INSERT KC_INT 49 Keyboard Insert1
KC_INSERT KC_INS 49 Keyboard Insert1
KC_HOME 4A Keyboard Home1 KC_HOME 4A Keyboard Home1
KC_PGUP 4B Keyboard PageUp1 KC_PGUP 4B Keyboard PageUp1
KC_DELETE KC_DELETE 4C Keyboard Delete Forward KC_DELETE KC_DELETE 4C Keyboard Delete Forward

+ 1
- 0
doc/other_projects.md Ver arquivo

## ErgoDox[Ergo][Split][USB][AVR] ## ErgoDox[Ergo][Split][USB][AVR]
- <http://geekhack.org/index.php?topic=22780.0> - <http://geekhack.org/index.php?topic=22780.0>
- <https://github.com/benblazak/ergodox-firmware> - <https://github.com/benblazak/ergodox-firmware>
- <https://github.com/cub-uanic/tmk_keyboard>


## Suka's keyboard collection[Ergo][Split][3DPrinting][USB][AVR] ## Suka's keyboard collection[Ergo][Split][3DPrinting][USB][AVR]
- <http://deskthority.net/workshop-f7/my-diy-keyboard-collection-or-how-i-became-a-kb-geek-t2534.html> - <http://deskthority.net/workshop-f7/my-diy-keyboard-collection-or-how-i-became-a-kb-geek-t2534.html>

+ 2
- 0
protocol.mk Ver arquivo



ifdef PS2_USE_INT ifdef PS2_USE_INT
SRC += protocol/ps2_interrupt.c SRC += protocol/ps2_interrupt.c
SRC += protocol/ps2_io_avr.c
OPT_DEFS += -DPS2_USE_INT OPT_DEFS += -DPS2_USE_INT
endif endif


ifdef PS2_USE_USART ifdef PS2_USE_USART
SRC += protocol/ps2_usart.c SRC += protocol/ps2_usart.c
SRC += protocol/ps2_io_avr.c
OPT_DEFS += -DPS2_USE_USART OPT_DEFS += -DPS2_USE_USART
endif endif



+ 1
- 1
protocol/adb.c Ver arquivo

3: mice 3: mice


Registers: Registers:
0: application(keyobard uses this to store its data.)
0: application(keyboard uses this to store its data.)
1: application 1: application
2: application(keyboard uses this for LEDs and state of modifiers) 2: application(keyboard uses this for LEDs and state of modifiers)
3: status and command 3: status and command

+ 2
- 2
protocol/bluefruit/bluefruit.c Ver arquivo

void bluefruit_keyboard_print_report(report_keyboard_t *report) void bluefruit_keyboard_print_report(report_keyboard_t *report)
{ {
if (!debug_keyboard) return; if (!debug_keyboard) return;
dprintf("keys: "); for (int i = 0; i < REPORT_KEYS; i++) { debug_hex8(report->keys[i]); dprintf(" "); }
dprintf("keys: "); for (int i = 0; i < KEYBOARD_REPORT_KEYS; i++) { debug_hex8(report->keys[i]); dprintf(" "); }
dprintf(" mods: "); debug_hex8(report->mods); dprintf(" mods: "); debug_hex8(report->mods);
dprintf(" reserved: "); debug_hex8(report->reserved); dprintf(" reserved: "); debug_hex8(report->reserved);
dprintf("\n"); dprintf("\n");
bluefruit_trace_header(); bluefruit_trace_header();
#endif #endif
bluefruit_serial_send(0xFD); bluefruit_serial_send(0xFD);
for (uint8_t i = 0; i < REPORT_SIZE; i++) {
for (uint8_t i = 0; i < KEYBOARD_REPORT_SIZE; i++) {
bluefruit_serial_send(report->raw[i]); bluefruit_serial_send(report->raw[i]);
} }
#ifdef BLUEFRUIT_TRACE_SERIAL #ifdef BLUEFRUIT_TRACE_SERIAL

+ 22
- 19
protocol/lufa/lufa.c Ver arquivo

*/ */
void EVENT_USB_Device_Connect(void) void EVENT_USB_Device_Connect(void)
{ {
print("[C]");
/* For battery powered device */ /* For battery powered device */
if (!USB_IsInitialized) { if (!USB_IsInitialized) {
USB_Disable();
USB_Init(); USB_Init();
USB_Device_EnableSOFEvents(); USB_Device_EnableSOFEvents();
} }


void EVENT_USB_Device_Disconnect(void) void EVENT_USB_Device_Disconnect(void)
{ {
print("[D]");
/* For battery powered device */ /* For battery powered device */
USB_IsInitialized = false;
/* TODO: This doesn't work. After several plug in/outs can not be enumerated. /* TODO: This doesn't work. After several plug in/outs can not be enumerated.
if (USB_IsInitialized) { if (USB_IsInitialized) {
USB_Disable(); // Disable all interrupts USB_Disable(); // Disable all interrupts


void EVENT_USB_Device_Reset(void) void EVENT_USB_Device_Reset(void)
{ {
print("[R]");
} }


void EVENT_USB_Device_Suspend() void EVENT_USB_Device_Suspend()
{ {
print("[S]");
matrix_power_down();
#ifdef SLEEP_LED_ENABLE #ifdef SLEEP_LED_ENABLE
sleep_led_enable(); sleep_led_enable();
#endif #endif


void EVENT_USB_Device_WakeUp() void EVENT_USB_Device_WakeUp()
{ {
print("[W]");
suspend_wakeup_init(); suspend_wakeup_init();


#ifdef SLEEP_LED_ENABLE #ifdef SLEEP_LED_ENABLE
uint8_t ep = Endpoint_GetCurrentEndpoint(); uint8_t ep = Endpoint_GetCurrentEndpoint();
Endpoint_SelectEndpoint(CONSOLE_IN_EPNUM); Endpoint_SelectEndpoint(CONSOLE_IN_EPNUM);
if (!Endpoint_IsEnabled() || !Endpoint_IsConfigured()) { if (!Endpoint_IsEnabled() || !Endpoint_IsConfigured()) {
Endpoint_SelectEndpoint(ep);
return -1;
goto ERROR_EXIT;
} }


if (timeouted && !Endpoint_IsReadWriteAllowed()) { if (timeouted && !Endpoint_IsReadWriteAllowed()) {
Endpoint_SelectEndpoint(ep);
return - 1;
goto ERROR_EXIT;
} }


timeouted = false; timeouted = false;


uint8_t timeout = SEND_TIMEOUT; uint8_t timeout = SEND_TIMEOUT;
uint16_t prevFN = USB_Device_GetFrameNumber();
while (!Endpoint_IsReadWriteAllowed()) { while (!Endpoint_IsReadWriteAllowed()) {
switch (USB_DeviceState) {
case DEVICE_STATE_Unattached:
case DEVICE_STATE_Suspended:
return -1;
if (USB_DeviceState != DEVICE_STATE_Configured) {
goto ERROR_EXIT;
} }
if (Endpoint_IsStalled()) { if (Endpoint_IsStalled()) {
Endpoint_SelectEndpoint(ep);
return -1;
goto ERROR_EXIT;
} }
if (prevFN != USB_Device_GetFrameNumber()) {
if (!(timeout--)) {
timeouted = true;
Endpoint_SelectEndpoint(ep);
return -1;
}
prevFN = USB_Device_GetFrameNumber();
if (!(timeout--)) {
timeouted = true;
goto ERROR_EXIT;
} }
_delay_ms(1);
} }


Endpoint_Write_8(c); Endpoint_Write_8(c);


Endpoint_SelectEndpoint(ep); Endpoint_SelectEndpoint(ep);
return 0; return 0;
ERROR_EXIT:
Endpoint_SelectEndpoint(ep);
return -1;
} }
#else #else
int8_t sendchar(uint8_t c) int8_t sendchar(uint8_t c)
print("Keyboard start.\n"); print("Keyboard start.\n");
while (1) { while (1) {
while (USB_DeviceState == DEVICE_STATE_Suspended) { while (USB_DeviceState == DEVICE_STATE_Suspended) {
suspend_power_down(WDTO_120MS);
print("[s]");
suspend_power_down();
if (USB_Device_RemoteWakeupEnabled && suspend_wakeup_condition()) { if (USB_Device_RemoteWakeupEnabled && suspend_wakeup_condition()) {
USB_Device_SendRemoteWakeup(); USB_Device_SendRemoteWakeup();
} }

+ 18
- 3
protocol/m0110.c Ver arquivo



Scan Code Scan Code
--------- ---------
m0110_recv_key() function returns following scan codes instead of raw key events.
Scan codes are 1 byte long and MSB(bit7) is set when key is released.
m0110_recv_key() function returns following scan codes instead of M0110 raw codes.
Scan codes are 1 byte size and MSB(bit7) is set when key is released.

scancode = ((raw&0x80) | ((raw&0x7F)>>1))


M0110 M0120 M0110 M0120
,---------------------------------------------------------. ,---------------. ,---------------------------------------------------------. ,---------------.
| 3A| 37| 31 | 34| 3A| | 52| 41| | | 3A| 37| 31 | 34| 3A| | 52| 41| |
`------------------------------------------------' `---------------' `------------------------------------------------' `---------------'


International keyboard(See page 22 of "Technical Info for 128K/512K")
,---------------------------------------------------------.
| 32| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18| 33|
|---------------------------------------------------------|
| 30| 0C| 0D| 0E| 0F| 10| 11| 20| 22| 1F| 23| 21| 1E| 2A|
|------------------------------------------------------ |
| 39| 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27| 24| |
|---------------------------------------------------------|
| 38| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C| 0A| 38|
`---------------------------------------------------------'
| 3A| 37| 34 | 31| 3A|
`------------------------------------------------'

M0110A M0110A
,---------------------------------------------------------. ,---------------. ,---------------------------------------------------------. ,---------------.
| `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Bcksp| |Clr| =| /| *| | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Bcksp| |Clr| =| /| *|
Signaling: Signaling:
http://www.kbdbabel.org/signaling/kbd_signaling_mac.png http://www.kbdbabel.org/signaling/kbd_signaling_mac.png
http://typematic.blog.shinobi.jp/Entry/14/ http://typematic.blog.shinobi.jp/Entry/14/
Scan Codes:
M0110 raw scan codes:
Page 22 of Tech Info for 128K/512K Page 22 of Tech Info for 128K/512K
Page 07 of Tech Info for Plus Page 07 of Tech Info for Plus
http://m0115.web.fc2.com/m0110.jpg http://m0115.web.fc2.com/m0110.jpg

+ 25
- 0
protocol/pjrc/MEMO.txt Ver arquivo

Endpoint configuration
----------------------
0 Control endpoint
1 keyboard
2 mouse
3 debug
4 extra key(consumer/system)
5 nkro keyboard(supported only on ATmega32U4/16U4 and AT90USB64/128)


ATmega32U4/16U4, AT90USB64/128
• Endpoint 0:programmable size FIFO up to 64 bytes, default control endpoint
• Endpoints 1 programmable size FIFO up to 256 bytes in ping-pong mode.
• Endpoints 2 to 6: programmable size FIFO up to 64 bytes in ping-pong mode.

AT90USB82/162, ATmega8U2/16U2/32U2
• Endpoint 0:programmable size FIFO up to 64 bytes, default control endpoint
• Endpoints 1 and 2: programmable size FIFO up to 64 bytes.
• Endpoints 3 and 4: programmable size FIFO up to 64 bytes with ping-pong mode.

ping-pong mode means double buffer feature.


NOTE: ATmega8U2/16U2/32U2 is not supported with PJRC stack at this time.
TODO: Macro definition for ATmega8U2/16U2/32U2 in usb.h

+ 1
- 0
protocol/pjrc/main.c Ver arquivo

#include <stdbool.h> #include <stdbool.h>
#include <avr/io.h> #include <avr/io.h>
#include <avr/interrupt.h> #include <avr/interrupt.h>
#include <avr/wdt.h>
#include <util/delay.h> #include <util/delay.h>
#include "keyboard.h" #include "keyboard.h"
#include "usb.h" #include "usb.h"

+ 1
- 1
protocol/pjrc/usb.h Ver arquivo

#define KBD_INTERFACE 0 #define KBD_INTERFACE 0
#define KBD_ENDPOINT 1 #define KBD_ENDPOINT 1
#define KBD_SIZE 8 #define KBD_SIZE 8
#define KBD_BUFFER EP_DOUBLE_BUFFER
#define KBD_BUFFER EP_SINGLE_BUFFER
#define KBD_REPORT_KEYS (KBD_SIZE - 2) #define KBD_REPORT_KEYS (KBD_SIZE - 2)


// secondary keyboard // secondary keyboard

+ 1
- 1
protocol/pjrc/usb_keyboard.c Ver arquivo

{ {
if (!debug_keyboard) return; if (!debug_keyboard) return;
print("keys: "); print("keys: ");
for (int i = 0; i < REPORT_KEYS; i++) { phex(report->keys[i]); print(" "); }
for (int i = 0; i < KEYBOARD_REPORT_KEYS; i++) { phex(report->keys[i]); print(" "); }
print(" mods: "); phex(report->mods); print("\n"); print(" mods: "); phex(report->mods); print("\n");
} }



+ 1
- 1
protocol/pjrc/usb_mouse.h Ver arquivo

#define MOUSE_INTERFACE 1 #define MOUSE_INTERFACE 1
#define MOUSE_ENDPOINT 2 #define MOUSE_ENDPOINT 2
#define MOUSE_SIZE 8 #define MOUSE_SIZE 8
#define MOUSE_BUFFER EP_DOUBLE_BUFFER
#define MOUSE_BUFFER EP_SINGLE_BUFFER


#define MOUSE_BTN1 (1<<0) #define MOUSE_BTN1 (1<<0)
#define MOUSE_BTN2 (1<<1) #define MOUSE_BTN2 (1<<1)

+ 1
- 0
protocol/ps2_interrupt.c Ver arquivo

#include <avr/interrupt.h> #include <avr/interrupt.h>
#include <util/delay.h> #include <util/delay.h>
#include "ps2.h" #include "ps2.h"
#include "ps2_io.h"
#include "print.h" #include "print.h"





+ 1
- 0
protocol/ps2_io_avr.c Ver arquivo

#include <stdbool.h> #include <stdbool.h>
#include <avr/io.h>
#include <util/delay.h> #include <util/delay.h>


/* Check port settings for clock and data line */ /* Check port settings for clock and data line */

+ 1
- 0
protocol/ps2_usart.c Ver arquivo

#include <avr/interrupt.h> #include <avr/interrupt.h>
#include <util/delay.h> #include <util/delay.h>
#include "ps2.h" #include "ps2.h"
#include "ps2_io.h"
#include "print.h" #include "print.h"





+ 2
- 1
protocol/usb_hid.mk Ver arquivo

USB_HOST_SHIELD_SRC = \ USB_HOST_SHIELD_SRC = \
$(USB_HOST_SHIELD_DIR)/Usb.cpp \ $(USB_HOST_SHIELD_DIR)/Usb.cpp \
$(USB_HOST_SHIELD_DIR)/hid.cpp \ $(USB_HOST_SHIELD_DIR)/hid.cpp \
$(USB_HOST_SHIELD_DIR)/usbhub.cpp \
$(USB_HOST_SHIELD_DIR)/parsetools.cpp \ $(USB_HOST_SHIELD_DIR)/parsetools.cpp \
$(USB_HOST_SHIELD_DIR)/message.cpp $(USB_HOST_SHIELD_DIR)/message.cpp




# replace arduino/wiring.c # replace arduino/wiring.c
SRC += $(USB_HID_DIR)/override_wiring.c SRC += $(USB_HID_DIR)/override_wiring.c
SRC += common/timer.c
SRC += common/avr/timer.c


SRC += $(USB_HOST_SHIELD_SRC) SRC += $(USB_HOST_SHIELD_SRC)
SRC += $(ARDUINO_CORES_SRC) SRC += $(ARDUINO_CORES_SRC)

+ 1
- 1
protocol/usb_hid/USB_Host_Shield_2.0

Subproject commit 8bb790f83af298b5f3e5516259c9d8ec27efe522
Subproject commit 2b4a56de3d090686f62d25ea34042759dc4352d6

+ 5
- 0
rules.mk Ver arquivo

batchisp -hardware usb -device $(MCU) -operation start reset 0 batchisp -hardware usb -device $(MCU) -operation start reset 0


dfu: $(TARGET).hex dfu: $(TARGET).hex
ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1)))
dfu-programmer $(MCU) erase --force
else
dfu-programmer $(MCU) erase
endif
dfu-programmer $(MCU) erase dfu-programmer $(MCU) erase
dfu-programmer $(MCU) flash $(TARGET).hex dfu-programmer $(MCU) flash $(TARGET).hex
dfu-programmer $(MCU) reset dfu-programmer $(MCU) reset

+ 2
- 0
tool/mbed/common.mk Ver arquivo

$(OBJDIR)/common/host.o \ $(OBJDIR)/common/host.o \
$(OBJDIR)/common/keymap.o \ $(OBJDIR)/common/keymap.o \
$(OBJDIR)/common/keyboard.o \ $(OBJDIR)/common/keyboard.o \
$(OBJDIR)/common/print.o \
$(OBJDIR)/common/debug.o \
$(OBJDIR)/common/util.o \ $(OBJDIR)/common/util.o \
$(OBJDIR)/common/mbed/suspend.o \ $(OBJDIR)/common/mbed/suspend.o \
$(OBJDIR)/common/mbed/timer.o \ $(OBJDIR)/common/mbed/timer.o \

+ 23
- 14
tool/mbed/gcc.mk Ver arquivo

###############################################################################
# based on Makefile exported form mbed.org
# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded

GCC_BIN = GCC_BIN =
AS = $(GCC_BIN)arm-none-eabi-as AS = $(GCC_BIN)arm-none-eabi-as
CC = $(GCC_BIN)arm-none-eabi-gcc CC = $(GCC_BIN)arm-none-eabi-gcc
SIZE = $(GCC_BIN)arm-none-eabi-size SIZE = $(GCC_BIN)arm-none-eabi-size
CHKSUM = $(TMK_DIR)/tool/mbed/lpc-vector-checksum CHKSUM = $(TMK_DIR)/tool/mbed/lpc-vector-checksum


CPU = -mcpu=cortex-m0 -mthumb

CC_FLAGS += $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
CC_FLAGS += \
$(CPU) \
-c \
-g \
-fno-common \
-fmessage-length=0 \
-Wall \
-fno-exceptions \
-ffunction-sections \
-fdata-sections \
-fomit-frame-pointer
CC_FLAGS += -MMD -MP CC_FLAGS += -MMD -MP
CC_SYMBOLS = -DTARGET_LPC11U35_401 -DTARGET_M0 -DTARGET_NXP -DTARGET_LPC11UXX -DTOOLCHAIN_GCC_ARM -DTOOLCHAIN_GCC -D__CORTEX_M0 -DARM_MATH_CM0 -DMBED_BUILD_TIMESTAMP=1399108688.49 -D__MBED__=1


LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs
LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs
#LD_FLAGS += -u _printf_float -u _scanf_float
LD_FLAGS += -Wl,-Map=$(OBJDIR)/$(PROJECT).map,--cref LD_FLAGS += -Wl,-Map=$(OBJDIR)/$(PROJECT).map,--cref
LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys


CC_FLAGS += -DNDEBUG -Os CC_FLAGS += -DNDEBUG -Os
endif endif


all: $(OBJDIR)/$(PROJECT).bin $(OBJDIR)/$(PROJECT).hex size
all: $(OBJDIR)/$(PROJECT).bin $(OBJDIR)/$(PROJECT).hex


clean: clean:
rm -f $(OBJDIR)/$(PROJECT).bin $(OBJDIR)/$(PROJECT).elf $(OBJDIR)/$(PROJECT).hex $(OBJDIR)/$(PROJECT).map $(OBJDIR)/$(PROJECT).lst $(OBJECTS) $(DEPS) rm -f $(OBJDIR)/$(PROJECT).bin $(OBJDIR)/$(PROJECT).elf $(OBJDIR)/$(PROJECT).hex $(OBJDIR)/$(PROJECT).map $(OBJDIR)/$(PROJECT).lst $(OBJECTS) $(DEPS)


$(OBJDIR)/%.o: %.cpp $(OBJDIR)/%.o: %.cpp
mkdir -p $(@D) mkdir -p $(@D)
$(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 $(INCLUDE_PATHS) -o $@ $<
$(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $<




$(OBJDIR)/$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) $(OBJDIR)/$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS)
$(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS)
@echo ""
@echo "*****"
@echo "***** You must modify vector checksum value in *.bin and *.hex files."
@echo "*****"
@echo ""
$(SIZE) $@


$(OBJDIR)/$(PROJECT).bin: $(OBJDIR)/$(PROJECT).elf $(OBJDIR)/$(PROJECT).bin: $(OBJDIR)/$(PROJECT).elf
@$(OBJCOPY) -O binary $< $@ @$(OBJCOPY) -O binary $< $@
@echo "Writing vector checksum value into $@ ..."
ifneq (,$(findstring TARGET_NXP,$(CC_SYMBOLS)))
@echo
@echo "For NXP writing vector checksum value into $@ ..."
@$(CHKSUM) $@ @$(CHKSUM) $@
@echo @echo
endif


$(OBJDIR)/$(PROJECT).hex: $(OBJDIR)/$(PROJECT).elf $(OBJDIR)/$(PROJECT).hex: $(OBJDIR)/$(PROJECT).elf
@$(OBJCOPY) -O ihex $< $@ @$(OBJCOPY) -O ihex $< $@

+ 50
- 0
tool/mbed/lpc11u35_501.mk Ver arquivo

# based on Makefile exported form mbed.org
# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded

CPU = -mcpu=cortex-m0 -mthumb

CC_SYMBOLS = \
-DTARGET_LPC11U35_501 \
-DTARGET_M0 \
-DTARGET_CORTEX_M \
-DTARGET_NXP \
-DTARGET_LPC11UXX \
-DTARGET_MCU_LPC11U35_501 \
-DTOOLCHAIN_GCC_ARM \
-DTOOLCHAIN_GCC \
-D__CORTEX_M0 \
-DARM_MATH_CM0 \
-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 \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_MCU_LPC11U35_501/PeripheralPins.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/analogin_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/gpio_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/gpio_irq_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/i2c_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/pinmap.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/port_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/pwmout_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/serial_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/sleep.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/spi_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/us_ticker.o

INCLUDE_PATHS += \
-I$(MBED_DIR)/libraries/mbed/targets \
-I$(MBED_DIR)/libraries/mbed/targets/cmsis \
-I$(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_NXP \
-I$(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX \
-I$(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM \
-I$(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/TARGET_LPC11U35_501 \
-I$(MBED_DIR)/libraries/mbed/targets/hal \
-I$(MBED_DIR)/libraries/mbed/targets/hal/TARGET_NXP \
-I$(MBED_DIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX \
-I$(MBED_DIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_MCU_LPC11U35_501 \
-I$(MBED_DIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_MCU_LPC11U35_501/TARGET_LPC11U35_501

LINKER_SCRIPT = $(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/TARGET_LPC11U35_501/LPC11U35.ld

+ 68
- 82
tool/mbed/mbed.mk Ver arquivo

# based on Makefile exported form mbed.org
# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded

OBJECTS += \ OBJECTS += \
$(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 \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/port_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/spi_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/analogin_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/gpio_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/gpio_irq_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/serial_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/i2c_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/pwmout_api.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/sleep.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/pinmap.o \
$(OBJDIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/us_ticker.o \
$(OBJDIR)/libraries/mbed/common/board.o \
$(OBJDIR)/libraries/mbed/common/mbed_interface.o \
$(OBJDIR)/libraries/mbed/common/exit.o \
$(OBJDIR)/libraries/mbed/common/rtc_time.o \
$(OBJDIR)/libraries/mbed/common/us_ticker_api.o \
$(OBJDIR)/libraries/mbed/common/pinmap_common.o \
$(OBJDIR)/libraries/mbed/common/error.o \
$(OBJDIR)/libraries/mbed/common/gpio.o \ $(OBJDIR)/libraries/mbed/common/gpio.o \
$(OBJDIR)/libraries/mbed/common/semihost_api.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/mbed/common/RawSerial.o \
$(OBJDIR)/libraries/mbed/common/Ticker.o \
$(OBJDIR)/libraries/mbed/common/FilePath.o \
$(OBJDIR)/libraries/mbed/common/I2C.o \
$(OBJDIR)/libraries/mbed/common/FileBase.o \
$(OBJDIR)/libraries/mbed/common/retarget.o \
$(OBJDIR)/libraries/mbed/common/Serial.o \
$(OBJDIR)/libraries/mbed/common/Stream.o \
$(OBJDIR)/libraries/mbed/common/FileSystemLike.o \
$(OBJDIR)/libraries/mbed/common/CallChain.o \
$(OBJDIR)/libraries/mbed/common/InterruptManager.o \
$(OBJDIR)/libraries/mbed/common/SerialBase.o \
$(OBJDIR)/libraries/mbed/common/BusInOut.o \
$(OBJDIR)/libraries/mbed/common/SPISlave.o \
$(OBJDIR)/libraries/mbed/common/I2CSlave.o \
$(OBJDIR)/libraries/mbed/common/FunctionPointer.o \
$(OBJDIR)/libraries/mbed/common/Timer.o \
$(OBJDIR)/libraries/mbed/common/SPI.o \
$(OBJDIR)/libraries/mbed/common/Timeout.o \
$(OBJDIR)/libraries/mbed/common/Ethernet.o \
$(OBJDIR)/libraries/mbed/common/TimerEvent.o \
$(OBJDIR)/libraries/mbed/common/CAN.o \
$(OBJDIR)/libraries/mbed/common/BusOut.o \
$(OBJDIR)/libraries/mbed/common/FileLike.o \
$(OBJDIR)/libraries/mbed/common/BusIn.o \
$(OBJDIR)/libraries/mbed/common/InterruptIn.o \
$(OBJDIR)/libraries/mbed/common/LocalFileSystem.o \
$(OBJDIR)/libraries/USBDevice/USBHID/USBMouse.o \
$(OBJDIR)/libraries/USBDevice/USBHID/USBHID.o \
$(OBJDIR)/libraries/USBDevice/USBHID/USBMouseKeyboard.o \
$(OBJDIR)/libraries/USBDevice/USBHID/USBKeyboard.o \
$(OBJDIR)/libraries/USBDevice/USBDevice/USBHAL_KL25Z.o \
$(OBJDIR)/libraries/USBDevice/USBDevice/USBDevice.o \
$(OBJDIR)/libraries/USBDevice/USBDevice/USBHAL_LPC17.o \
$(OBJDIR)/libraries/USBDevice/USBDevice/USBHAL_LPC40.o \
$(OBJDIR)/libraries/USBDevice/USBDevice/USBHAL_LPC11U.o \
$(OBJDIR)/libraries/USBDevice/USBDevice/USBHAL_STM32F4.o \
$(OBJDIR)/libraries/USBDevice/USBAudio/USBAudio.o \
$(OBJDIR)/libraries/USBDevice/USBSerial/USBSerial.o \
$(OBJDIR)/libraries/USBDevice/USBSerial/USBCDC.o \
$(OBJDIR)/libraries/USBDevice/USBMSD/USBMSD.o \
$(OBJDIR)/libraries/USBDevice/USBMIDI/USBMIDI.o
$(OBJDIR)/libraries/USBDevice/USBDevice/USBDevice.o


# $(OBJDIR)/libraries/mbed/common/assert.o \
# $(OBJDIR)/libraries/mbed/common/board.o \
# $(OBJDIR)/libraries/mbed/common/BusIn.o \
# $(OBJDIR)/libraries/mbed/common/BusInOut.o \
# $(OBJDIR)/libraries/mbed/common/BusOut.o \
# $(OBJDIR)/libraries/mbed/common/CallChain.o \
# $(OBJDIR)/libraries/mbed/common/CAN.o \
# $(OBJDIR)/libraries/mbed/common/error.o \
# $(OBJDIR)/libraries/mbed/common/Ethernet.o \
# $(OBJDIR)/libraries/mbed/common/exit.o \
# $(OBJDIR)/libraries/mbed/common/FileBase.o \
# $(OBJDIR)/libraries/mbed/common/FileLike.o \
# $(OBJDIR)/libraries/mbed/common/FilePath.o \
# $(OBJDIR)/libraries/mbed/common/FileSystemLike.o \
# $(OBJDIR)/libraries/mbed/common/FunctionPointer.o \
# $(OBJDIR)/libraries/mbed/common/gpio.o \
# $(OBJDIR)/libraries/mbed/common/I2C.o \
# $(OBJDIR)/libraries/mbed/common/I2CSlave.o \
# $(OBJDIR)/libraries/mbed/common/InterruptIn.o \
# $(OBJDIR)/libraries/mbed/common/InterruptManager.o \
# $(OBJDIR)/libraries/mbed/common/LocalFileSystem.o \
# $(OBJDIR)/libraries/mbed/common/mbed_interface.o \
# $(OBJDIR)/libraries/mbed/common/pinmap_common.o \
# $(OBJDIR)/libraries/mbed/common/RawSerial.o \
# $(OBJDIR)/libraries/mbed/common/retarget.o \
# $(OBJDIR)/libraries/mbed/common/rtc_time.o \
# $(OBJDIR)/libraries/mbed/common/semihost_api.o \
# $(OBJDIR)/libraries/mbed/common/SerialBase.o \
# $(OBJDIR)/libraries/mbed/common/Serial.o \
# $(OBJDIR)/libraries/mbed/common/SPI.o \
# $(OBJDIR)/libraries/mbed/common/SPISlave.o \
# $(OBJDIR)/libraries/mbed/common/Stream.o \
# $(OBJDIR)/libraries/mbed/common/Ticker.o \
# $(OBJDIR)/libraries/mbed/common/Timeout.o \
# $(OBJDIR)/libraries/mbed/common/TimerEvent.o \
# $(OBJDIR)/libraries/mbed/common/Timer.o \
# $(OBJDIR)/libraries/mbed/common/us_ticker_api.o \
# $(OBJDIR)/libraries/mbed/common/wait_api.o \
# $(OBJDIR)/libraries/USBDevice/USBAudio/USBAudio.o \
# $(OBJDIR)/libraries/USBDevice/USBDevice/USBDevice.o \
# $(OBJDIR)/libraries/USBDevice/USBDevice/USBHAL_KL25Z.o \
# $(OBJDIR)/libraries/USBDevice/USBDevice/USBHAL_LPC11U.o \
# $(OBJDIR)/libraries/USBDevice/USBDevice/USBHAL_LPC17.o \
# $(OBJDIR)/libraries/USBDevice/USBDevice/USBHAL_LPC40.o \
# $(OBJDIR)/libraries/USBDevice/USBDevice/USBHAL_RZ_A1H.o \
# $(OBJDIR)/libraries/USBDevice/USBDevice/USBHAL_STM32F4.o \
# $(OBJDIR)/libraries/USBDevice/USBHID/USBHID.o \
# $(OBJDIR)/libraries/USBDevice/USBHID/USBKeyboard.o \
# $(OBJDIR)/libraries/USBDevice/USBHID/USBMouseKeyboard.o \
# $(OBJDIR)/libraries/USBDevice/USBHID/USBMouse.o \
# $(OBJDIR)/libraries/USBDevice/USBMIDI/USBMIDI.o \
# $(OBJDIR)/libraries/USBDevice/USBMSD/USBMSD.o \
# $(OBJDIR)/libraries/USBDevice/USBSerial/USBCDC.o \
# $(OBJDIR)/libraries/USBDevice/USBSerial/USBSerial.o


INCLUDE_PATHS += \ INCLUDE_PATHS += \
-I$(MBED_DIR)/libraries/mbed/targets \
-I$(MBED_DIR)/libraries/mbed/targets/hal \
-I$(MBED_DIR)/libraries/mbed/targets/hal/TARGET_NXP \
-I$(MBED_DIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX \
-I$(MBED_DIR)/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_LPC11U35_401 \
-I$(MBED_DIR)/libraries/mbed/targets/cmsis \
-I$(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_NXP \
-I$(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX \
-I$(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM \
-I$(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/TARGET_LPC11U35_401 \
-I$(MBED_DIR)/libraries/mbed \ -I$(MBED_DIR)/libraries/mbed \
-I$(MBED_DIR)/libraries/mbed/hal \
-I$(MBED_DIR)/libraries/mbed/api \ -I$(MBED_DIR)/libraries/mbed/api \
-I$(MBED_DIR)/libraries/mbed/common \ -I$(MBED_DIR)/libraries/mbed/common \
-I$(MBED_DIR)/libraries/mbed/hal \
-I$(MBED_DIR)/libraries/USBDevice \ -I$(MBED_DIR)/libraries/USBDevice \
-I$(MBED_DIR)/libraries/USBDevice/USBHID \
-I$(MBED_DIR)/libraries/USBDevice/USBDevice \
-I$(MBED_DIR)/libraries/USBDevice/USBAudio \ -I$(MBED_DIR)/libraries/USBDevice/USBAudio \
-I$(MBED_DIR)/libraries/USBDevice/USBSerial \
-I$(MBED_DIR)/libraries/USBDevice/USBDevice \
-I$(MBED_DIR)/libraries/USBDevice/USBHID \
-I$(MBED_DIR)/libraries/USBDevice/USBMIDI \
-I$(MBED_DIR)/libraries/USBDevice/USBMSD \ -I$(MBED_DIR)/libraries/USBDevice/USBMSD \
-I$(MBED_DIR)/libraries/USBDevice/USBMIDI
-I$(MBED_DIR)/libraries/USBDevice/USBSerial


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


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

LINKER_SCRIPT = $(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/TARGET_LPC11U35_401/LPC11U35.ld