Browse Source

Adhoc fix compile error of usb_usb

tags/v1.9
tmk 9 years ago
parent
commit
ea524d7bef

+ 1
- 0
common.mk View File

$(COMMON_DIR)/keymap.c \ $(COMMON_DIR)/keymap.c \
$(COMMON_DIR)/timer.c \ $(COMMON_DIR)/timer.c \
$(COMMON_DIR)/print.c \ $(COMMON_DIR)/print.c \
$(COMMON_DIR)/debug.c \
$(COMMON_DIR)/bootloader.c \ $(COMMON_DIR)/bootloader.c \
$(COMMON_DIR)/suspend.c \ $(COMMON_DIR)/suspend.c \
$(COMMON_DIR)/xprintf.S \ $(COMMON_DIR)/xprintf.S \

+ 12
- 0
common/debug.c View File

#include <stdbool.h>
#include "debug.h"


//debug_config_t debug_config = { .enable = false, .matrix = false };
debug_config_t debug_config = {
.enable = false,
.matrix = false,
.keyboard = false,
.mouse = false,
};


+ 1
- 1
common/debug_config.h View File

uint8_t reserved:4; uint8_t reserved:4;
}; };
} debug_config_t; } debug_config_t;
debug_config_t debug_config;
extern debug_config_t debug_config;


/* for backward compatibility */ /* for backward compatibility */
#define debug_enable (debug_config.enable) #define debug_enable (debug_config.enable)

+ 2
- 2
common/host.h View File

extern bool keyboard_nkro; extern bool keyboard_nkro;
#endif #endif


uint8_t keyboard_idle;
uint8_t keyboard_protocol;
extern uint8_t keyboard_idle;
extern uint8_t keyboard_protocol;




/* host driver */ /* host driver */

+ 0
- 3
common/print.h View File



// this macro allows you to write print("some text") and // this macro allows you to write print("some text") and
// the string is automatically placed into flash memory :) // the string is automatically placed into flash memory :)
// TODO: avoid collision with arduino/Print.h
#ifndef __cplusplus
#define print(s) print_P(PSTR(s)) #define print(s) print_P(PSTR(s))
#endif
#define println(s) print_P(PSTR(s "\n")) #define println(s) print_P(PSTR(s "\n"))


/* for old name */ /* for old name */

+ 8
- 0
common/xprintf.h View File

#include <inttypes.h> #include <inttypes.h>
#include <avr/pgmspace.h> #include <avr/pgmspace.h>
#ifdef __cplusplus
extern "C" {
#endif
extern void (*xfunc_out)(uint8_t); extern void (*xfunc_out)(uint8_t);
#define xdev_out(func) xfunc_out = (void(*)(uint8_t))(func) #define xdev_out(func) xfunc_out = (void(*)(uint8_t))(func)
Pointer to return value Pointer to return value
*/ */
#ifdef __cplusplus
}
#endif
#endif #endif

+ 1
- 0
converter/usb_usb/config.h View File

#define MATRIX_ROWS 32 #define MATRIX_ROWS 32
#define MATRIX_COLS 8 #define MATRIX_COLS 8


#define USE_LEGACY_KEYMAP


/* key combination for command */ /* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))

+ 0
- 1
converter/usb_usb/main.cpp View File

LED_TX_INIT; LED_TX_INIT;
LED_TX_ON; LED_TX_ON;


print_enable = true;
debug_enable = true; debug_enable = true;
debug_matrix = true; debug_matrix = true;
debug_keyboard = true; debug_keyboard = true;

+ 1
- 1
protocol/usb_hid/arduino-1.0.1/cores/arduino/WString.h View File

// -std=c++0x // -std=c++0x


class __FlashStringHelper; class __FlashStringHelper;
#define F(string_literal) (reinterpret_cast<__FlashStringHelper *>(PSTR(string_literal)))
#define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))


// An inherited class for holding the result of a concatenation. These // An inherited class for holding the result of a concatenation. These
// result objects are assumed to be writable by subsequent concatenations. // result objects are assumed to be writable by subsequent concatenations.

+ 1
- 0
protocol/usb_hid/override_wiring.c View File

/* /*
* To keep Timer0 for common/timer.c override arduino/wiring.c. * To keep Timer0 for common/timer.c override arduino/wiring.c.
*/ */
#define __DELAY_BACKWARD_COMPATIBLE__
#include <util/delay.h> #include <util/delay.h>
#include "common/timer.h" #include "common/timer.h"
#include "Arduino.h" #include "Arduino.h"

+ 0
- 2
protocol/usb_hid/parser.cpp View File

#include <cstring.h>

#include "parser.h" #include "parser.h"
#include "usb_hid.h" #include "usb_hid.h"



Loading…
Cancel
Save