Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
263 changes: 263 additions & 0 deletions keyboards/yowkees/keyball/drivers/pmw3360/srom_0x04.c

Large diffs are not rendered by default.

263 changes: 263 additions & 0 deletions keyboards/yowkees/keyball/drivers/pmw3360/srom_0x81.c

Large diffs are not rendered by default.

85 changes: 85 additions & 0 deletions keyboards/yowkees/keyball/keyball61/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
Copyright 2021 @Yowkees
Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

// Key matrix parameters (Keyball61 is duplex matrix)
#define MATRIX_ROWS (5 * 2) // split keyboard
#define MATRIX_COLS (4 * 2) // duplex matrix
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
#define MATRIX_COL_PINS { F4, F5, F6, F7 }
#define MATRIX_MASKED
#define DEBOUNCE 5

// Split parameters
#define SOFT_SERIAL_PIN D2
#define SPLIT_HAND_MATRIX_GRID F7, D7
#define SPLIT_HAND_MATRIX_GRID_LOW_IS_LEFT
#define SPLIT_USB_DETECT

#ifdef OLED_ENABLE
# define SPLIT_OLED_ENABLE
#endif

// If your PC does not recognize Keyball, try setting this macro. This macro
// increases the firmware size by 200 bytes, so it is disabled by default, but
// it has been reported to work well in such cases.
//#define SPLIT_WATCHDOG_ENABLE

//#define SPLIT_TRANSACTION_IDS_KB KEYBALL_GET_INFO, KEYBALL_GET_MOTION, KEYBALL_SET_CPI

// RGB LED settings
#ifdef RGBLIGHT_ENABLE
# ifndef RGBLIGHT_VAL_STEP
# define RGBLIGHT_VAL_STEP 12
# endif
# ifndef RGBLIGHT_HUE_STEP
# define RGBLIGHT_HUE_STEP 17
# endif
# ifndef RGBLIGHT_SAT_STEP
# define RGBLIGHT_SAT_STEP 17
# endif
#endif
#ifdef RGB_MATRIX_ENABLE
# define RGB_MATRIX_SPLIT { 37, 37 }
#endif

#ifndef OLED_FONT_H
# define OLED_FONT_H "keyboards/keyball/lib/logofont/logofont.c"
# define OLED_FONT_START 32
# define OLED_FONT_END 195
#endif

#if !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_32BIT)
# define LAYER_STATE_8BIT
#endif

// To squeeze firmware size
#undef LOCKING_SUPPORT_ENABLE
#undef LOCKING_RESYNC_ENABLE

#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define PMW33XX_CS_PIN B6

#define SPI_DRIVER SPID0
#define SPI_SCK_PIN B1
#define SPI_MOSI_PIN B2
#define SPI_MISO_PIN B3

#define SPLIT_POINTING_ENABLE
//#define MOUSE_EXTENDED_REPORT
25 changes: 25 additions & 0 deletions keyboards/yowkees/keyball/keyball61/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#define HAL_USE_I2C TRUE
#define HAL_USE_SPI TRUE
#define SPI_USE_WAIT TRUE
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD

#include_next <halconf.h>
48 changes: 48 additions & 0 deletions keyboards/yowkees/keyball/keyball61/keyball61.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
Copyright 2021 @Yowkees
Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H

#include "lib/keyball/keyball.h"

//////////////////////////////////////////////////////////////////////////////

// clang-format off
matrix_row_t matrix_mask[MATRIX_ROWS] = {
0b01110111,
0b01110111,
0b01110111,
0b11110111,
0b11110111,
0b01110111,
0b01110111,
0b01110111,
0b11110111,
0b11110111,
};
// clang-format on

void keyball_on_adjust_layout(keyball_adjust_t v) {
#ifdef RGBLIGHT_ENABLE
// adjust RGBLIGHT's clipping and effect ranges
uint8_t lednum_this = keyball.this_have_ball ? 34 : 37;
uint8_t lednum_that = !keyball.that_enable ? 0 : keyball.that_have_ball ? 34 : 37;
rgblight_set_clipping_range(is_keyboard_left() ? 0 : lednum_that, lednum_this);
rgblight_set_effect_range(0, lednum_this + lednum_that);
#endif
}
25 changes: 25 additions & 0 deletions keyboards/yowkees/keyball/keyball61/keyball61.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
Copyright 2021 @Yowkees
Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#include "quantum.h"
#include "lib/keyball/keyball.h"

// clang-format off

Loading