aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfishsoupisgood <github@madingley.org>2020-10-02 09:48:01 +0100
committerfishsoupisgood <github@madingley.org>2020-10-02 09:48:01 +0100
commit91f71bc582f184043df851ead61b636442663b83 (patch)
treedf10f87b86dd2889cc596cff6ff97ef049e0eb36
parent28bd394eb775b5f3180ada278d69f3ddadd28ec1 (diff)
downloadfirmware-91f71bc582f184043df851ead61b636442663b83.tar.gz
firmware-91f71bc582f184043df851ead61b636442663b83.tar.bz2
firmware-91f71bc582f184043df851ead61b636442663b83.zip
fish
-rw-r--r--keyboards/ymdk/ymd09_32a/keymaps/jmm/keymap.c2
-rw-r--r--keyboards/ymdk/ymd09_32a/rules.mk6
-rw-r--r--keyboards/ymdk/ymd09_32a/ymd09_32a.c39
-rw-r--r--tmk_core/protocol/vusb/vusb.c15
4 files changed, 15 insertions, 47 deletions
diff --git a/keyboards/ymdk/ymd09_32a/keymaps/jmm/keymap.c b/keyboards/ymdk/ymd09_32a/keymaps/jmm/keymap.c
index 982fd95f1..6d0443934 100644
--- a/keyboards/ymdk/ymd09_32a/keymaps/jmm/keymap.c
+++ b/keyboards/ymdk/ymd09_32a/keymaps/jmm/keymap.c
@@ -4,7 +4,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(KC_A, KC_B, KC_C,
KC_D, LT(1,KC_E), KC_F,
- KC_G, KC_H, KC_U ),
+ KC_G, KC_H, KC_I ),
[1] = LAYOUT(RGB_RMOD, RGB_VAI, RGB_MOD,
RGB_HUI, KC_TRNS, RGB_SAI,
diff --git a/keyboards/ymdk/ymd09_32a/rules.mk b/keyboards/ymdk/ymd09_32a/rules.mk
index 57b0c1c1b..b104cba4b 100644
--- a/keyboards/ymdk/ymd09_32a/rules.mk
+++ b/keyboards/ymdk/ymd09_32a/rules.mk
@@ -13,11 +13,11 @@ BOOTLOADER = bootloadHID
# build options
BOOTMAGIC_ENABLE = no
-MOUSEKEY_ENABLE = yes
-EXTRAKEY_ENABLE = yes
+MOUSEKEY_ENABLE = no
+EXTRAKEY_ENABLE = no
CONSOLE_ENABLE = no
COMMAND_ENABLE = yes
BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes
WS2812_DRIVER = i2c
-ENABLE_RAW = yes
+RAW_ENABLE = yes
diff --git a/keyboards/ymdk/ymd09_32a/ymd09_32a.c b/keyboards/ymdk/ymd09_32a/ymd09_32a.c
index e600ddd3a..870593e6a 100644
--- a/keyboards/ymdk/ymd09_32a/ymd09_32a.c
+++ b/keyboards/ymdk/ymd09_32a/ymd09_32a.c
@@ -19,43 +19,14 @@
void raw_hid_receive( uint8_t *data, uint8_t length )
{
- uint8_t *command_id = &(data[0]);
- uint8_t *command_data = &(data[1]);
- switch ( *command_id )
+ switch ( data[0] )
{
- case RAW_COMMAND_GET_PROTOCOL_VERSION: //0x01(id) 0x00(payload_length)
- {
- *command_id =RAW_COMMAND_GET_PROTOCOL_VERSION;
- command_data[0]=0x01;
- command_data[1]=PROTOCOL_VERSION;
- break;
- }
- case RAW_COMMAND_CHANGE_COLOR: // 0x05 0x03 0xRR 0xGG 0xBB
- {
- *command_id=RAW_COMMAND_CHANGE_COLOR;
- if(command_data[0] != 3 )
- {
- command_data[0]=0x01;
- command_data[1]=FAILED;
- }
- else
- {
- rgblight_sethsv(command_data[1], command_data[2], command_data[3]);
- command_data[0]=0x04;
- command_data[4]=SUCCESS;
- }
- break;
- }
- default: //0xff ...
- {
- *command_id=RAW_COMMAND_UNDEFINED;
- command_data[0]=0x01;
- command_data[1]=FAILED;
- break;
- }
+ case RAW_COMMAND_CHANGE_COLOR: // 0x05 0x04 0xLL 0xRR 0xGG 0xBB
+// rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ rgblight_setrgb_at(data[2],data[3],data[4],data[1]);
+ break;
}
- raw_hid_send(data,length);
}
void keyboard_pre_init_kb(void) {
diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c
index 77bbbd7bd..7d1a0a7a2 100644
--- a/tmk_core/protocol/vusb/vusb.c
+++ b/tmk_core/protocol/vusb/vusb.c
@@ -107,12 +107,13 @@ void vusb_transfer_keyboard(void) {
* RAW HID
*------------------------------------------------------------------*/
#ifdef RAW_ENABLE
-# define RAW_BUFFER_SIZE 32
+# define RAW_BUFFER_SIZE 8
# define RAW_EPSIZE 8
static uint8_t raw_output_buffer[RAW_BUFFER_SIZE];
static uint8_t raw_output_received_bytes = 0;
+#if 0
void raw_hid_send(uint8_t *data, uint8_t length) {
if (length != RAW_BUFFER_SIZE) {
return;
@@ -131,6 +132,7 @@ void raw_hid_send(uint8_t *data, uint8_t length) {
}
usbSetInterrupt4(0, 0);
}
+#endif
__attribute__((weak)) void raw_hid_receive(uint8_t *data, uint8_t length) {
// Users should #include "raw_hid.h" in their own code
@@ -344,15 +346,10 @@ void usbFunctionWriteOut(uchar *data, uchar len) {
return;
}
- if (raw_output_received_bytes + len > RAW_BUFFER_SIZE) {
- dprint("RAW: buffer full\n");
- raw_output_received_bytes = 0;
- } else {
- for (uint8_t i = 0; i < 8; i++) {
- raw_output_buffer[raw_output_received_bytes + i] = data[i];
- }
- raw_output_received_bytes += len;
+ for (uint8_t i = 0; i < 8; i++) {
+ raw_output_buffer[i] = data[i];
}
+ raw_output_received_bytes = len;
#endif
}