Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add 5075 keyboard. #20556

Open
wants to merge 83 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
b05890c
add 5075 keyboard.
jonylee1986 Apr 25, 2023
0786de9
add 5075 keyboard
jonylee1986 Apr 25, 2023
3769919
update readme.md
jonylee1986 Apr 25, 2023
0abcf3c
update info.json
jonylee1986 Apr 25, 2023
68b7f69
Update keyboards/akko/5075/rules.mk
jonylee1986 Apr 26, 2023
b7b75e5
Update keyboards/akko/5075/keymaps/via/rules.mk
jonylee1986 Apr 26, 2023
b262e2b
update info.json andadd keymap/default/rules.mk
jonylee1986 Apr 26, 2023
ab391ab
update info.json
jonylee1986 Apr 26, 2023
2664dc0
Move code to info.json,and removed redundant features
jonylee1986 May 26, 2023
eed023c
Update info.json
jonylee1986 Jun 1, 2023
6898594
Update keymap.c
jonylee1986 Jun 1, 2023
ca9b103
Update keymap.c
jonylee1986 Jun 1, 2023
dbccad4
Update readme.md
jonylee1986 Jun 9, 2023
326f3bd
Update config.h
jonylee1986 Aug 9, 2023
40cb160
Update info.json
jonylee1986 Sep 1, 2023
4bd5619
Update keyboards/akko/5075/keymaps/via/keymap.c
jonylee1986 Sep 15, 2023
160f8b6
Update keyboards/akko/5075/keymaps/via/keymap.c
jonylee1986 Sep 15, 2023
a7bed10
Update keyboards/akko/5075/keymaps/default/keymap.c
jonylee1986 Sep 15, 2023
b705098
Update keyboards/akko/5075/keymaps/default/keymap.c
jonylee1986 Sep 15, 2023
95772d1
Update keyboards/akko/5075/info.json
jonylee1986 Sep 18, 2023
b1ec5d8
Update keyboards/akko/5075/5075.c
jonylee1986 Sep 18, 2023
a000c40
Update keyboards/akko/5075/info.json
jonylee1986 Sep 18, 2023
8358e39
Update keymap.c
jonylee1986 Sep 27, 2023
04918b0
Update keymap.c
jonylee1986 Sep 27, 2023
da18fe3
Update keyboards/akko/5075/5075.c
jonylee1986 Oct 10, 2023
a3b9f61
Update 5075.c
jonylee1986 Oct 10, 2023
c7a87e3
Update keyboards/akko/5075/info.json
jonylee1986 Oct 18, 2023
6a29e47
Update keyboards/akko/5075/keymaps/default/keymap.c
jonylee1986 Oct 18, 2023
f68f58c
Update keyboards/akko/5075/keymaps/via/keymap.c
jonylee1986 Oct 18, 2023
9b1c82e
Update readme.md
jonylee1986 Oct 18, 2023
bc576f6
Update readme.md
jonylee1986 Oct 18, 2023
e0b0e4d
Update info.json
jonylee1986 Dec 6, 2023
55a0295
Update config.h
jonylee1986 Dec 6, 2023
4dfa0d1
Update 5075.c
jonylee1986 Dec 6, 2023
29afd70
Merge branch 'master' into hfd_5075
drashna Dec 9, 2023
f8ead3a
Update 5075.c
jonylee1986 Dec 20, 2023
efe8178
Merge branch 'qmk:master' into hfd_5075
jonylee1986 Jan 17, 2024
56dd230
Update keyboards/akko/5075/rules.mk
jonylee1986 Jan 22, 2024
453ce3c
Update keyboards/akko/5075/config.h
jonylee1986 Jan 22, 2024
fe0642f
Update keyboards/akko/5075/info.json
jonylee1986 Jan 22, 2024
d949d9a
Update keyboards/akko/5075/readme.md
jonylee1986 Jan 22, 2024
32134bd
Update keyboards/akko/5075/config.h
jonylee1986 Jan 22, 2024
6d21fe0
Update keyboards/akko/5075/config.h
jonylee1986 Jan 22, 2024
7de9d20
Update readme.md
jonylee1986 Feb 19, 2024
86eb94a
Update info.json
jonylee1986 Feb 19, 2024
dee0e01
Merge branch 'qmk:master' into hfd_5075
jonylee1986 Feb 19, 2024
cb5f88f
Update readme.md
jonylee1986 Feb 19, 2024
251efbc
Merge branch 'qmk:master' into hfd_5075
jonylee1986 Feb 22, 2024
c7f769b
Update keyboards/akko/5075/keymaps/default/keymap.c
jonylee1986 Mar 4, 2024
1558f52
Merge branch 'master' into hfd_5075
jonylee1986 Mar 4, 2024
8558e5c
Update keyboards/akko/5075/keymaps/default/keymap.c
jonylee1986 Mar 4, 2024
c304962
Update keyboards/akko/5075/keymaps/default/keymap.c
jonylee1986 Mar 4, 2024
de8f209
Update keyboards/akko/5075/keymaps/default/keymap.c
jonylee1986 Mar 4, 2024
8ac4978
Update keyboards/akko/5075/keymaps/via/keymap.c
jonylee1986 Mar 4, 2024
3bee3ea
Update keyboards/akko/5075/keymaps/via/keymap.c
jonylee1986 Mar 4, 2024
f13e1d4
Update keyboards/akko/5075/keymaps/via/keymap.c
jonylee1986 Mar 4, 2024
959eebb
Update keyboards/akko/5075/keymaps/via/keymap.c
jonylee1986 Mar 4, 2024
193c25c
Update keyboards/akko/5075/info.json
jonylee1986 Mar 4, 2024
2324fca
Update keyboards/akko/5075/info.json
jonylee1986 Mar 4, 2024
c987357
Update keymap.c
jonylee1986 Mar 5, 2024
1c2ae36
Update keymap.c
jonylee1986 Mar 5, 2024
e35bb49
Update keymap.c
jonylee1986 Mar 5, 2024
a0998e9
Merge branch 'qmk:master' into hfd_5075
jonylee1986 Mar 5, 2024
d24bf3b
Update keyboards/akko/5075/5075.c
jonylee1986 Mar 18, 2024
593c0cf
Update keyboards/akko/5075/5075.c
jonylee1986 Mar 18, 2024
ec17edd
Merge branch 'master' into hfd_5075
jonylee1986 Mar 18, 2024
aa79e41
Update readme.md
jonylee1986 Mar 19, 2024
19b4a1f
Update keyboards/akko/5075/5075.c
jonylee1986 May 15, 2024
5465ec5
Update keyboards/akko/5075/5075.c
jonylee1986 May 15, 2024
7acf7ec
Update 5075.c
jonylee1986 May 15, 2024
fd7c8b5
Update keyboards/akko/5075/info.json
jonylee1986 May 23, 2024
1a3013a
Delete keyboards/akko/5075/rules.mk
jonylee1986 Jun 5, 2024
45ad36f
Rename info.json to keyboard.json
jonylee1986 Jun 5, 2024
d31be91
Update readme.md
jonylee1986 Jun 12, 2024
7a5711a
Update config.h
jonylee1986 Jun 26, 2024
03d61c5
Update keyboard.json
jonylee1986 Jun 26, 2024
a424d57
Update keyboards/akko/5075/config.h
jonylee1986 Aug 29, 2024
d519e07
delete via keymap.
jonylee1986 Sep 20, 2024
72edeea
Update 5075.c
jonylee1986 Oct 22, 2024
e194523
Update 5075.c
jonylee1986 Oct 22, 2024
945d412
Update 5075.c
jonylee1986 Oct 22, 2024
addf6dc
Update keyboards/akko/5075/keyboard.json
jonylee1986 Oct 26, 2024
546772d
Update keyboard.json
jonylee1986 Nov 12, 2024
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
178 changes: 178 additions & 0 deletions keyboards/akko/5075/5075.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
/* Copyright (C) 2022 jonylee@hfd
*
* 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 "quantum.h"
// clang-format off
#ifdef RGB_MATRIX_ENABLE

const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
* | | G location
* | | | B location
* | | | | */
{1, CB1_CA1, CB2_CA1, CB3_CA1},
{1, CB1_CA2, CB2_CA2, CB3_CA2},
{1, CB1_CA3, CB2_CA3, CB3_CA3},
{1, CB1_CA4, CB2_CA4, CB3_CA4},
{1, CB1_CA5, CB2_CA5, CB3_CA5},
{1, CB1_CA6, CB2_CA6, CB3_CA6},
{1, CB1_CA7, CB2_CA7, CB3_CA7},
{1, CB1_CA8, CB2_CA8, CB3_CA8},
{1, CB1_CA9, CB2_CA9, CB3_CA9},
{1, CB1_CA10, CB2_CA10, CB3_CA10},
{1, CB1_CA11, CB2_CA11, CB3_CA11},
{1, CB1_CA12, CB2_CA12, CB3_CA12},
{1, CB1_CA13, CB2_CA13, CB3_CA13},
{1, CB1_CA14, CB2_CA14, CB3_CA14},

{0, CB1_CA1, CB2_CA1, CB3_CA1},
{0, CB1_CA2, CB2_CA2, CB3_CA2},
{0, CB1_CA3, CB2_CA3, CB3_CA3},
{0, CB1_CA4, CB2_CA4, CB3_CA4},
{0, CB1_CA5, CB2_CA5, CB3_CA5},
{0, CB1_CA6, CB2_CA6, CB3_CA6},
{0, CB1_CA7, CB2_CA7, CB3_CA7},
{0, CB1_CA8, CB2_CA8, CB3_CA8},
{0, CB1_CA9, CB2_CA9, CB3_CA9},
{0, CB1_CA10, CB2_CA10, CB3_CA10},
{0, CB1_CA11, CB2_CA11, CB3_CA11},
{0, CB1_CA12, CB2_CA12, CB3_CA12},
{0, CB1_CA13, CB2_CA13, CB3_CA13},
{0, CB1_CA14, CB2_CA14, CB3_CA14},
{1, CB4_CA1, CB5_CA1, CB6_CA1},

{0, CB4_CA1, CB5_CA1, CB6_CA1},
{0, CB4_CA2, CB5_CA2, CB6_CA2},
{0, CB4_CA3, CB5_CA3, CB6_CA3},
{0, CB4_CA4, CB5_CA4, CB6_CA4},
{0, CB4_CA5, CB5_CA5, CB6_CA5},
{0, CB4_CA6, CB5_CA6, CB6_CA6},
{0, CB4_CA7, CB5_CA7, CB6_CA7},
{0, CB4_CA8, CB5_CA8, CB6_CA8},
{0, CB4_CA9, CB5_CA9, CB6_CA9},
{0, CB4_CA10, CB5_CA10, CB6_CA10},
{0, CB4_CA11, CB5_CA11, CB6_CA11},
{0, CB4_CA12, CB5_CA12, CB6_CA12},
{0, CB4_CA13, CB5_CA13, CB6_CA13},
{0, CB4_CA14, CB5_CA14, CB6_CA14},
{1, CB4_CA2, CB5_CA2, CB6_CA2},

{0, CB7_CA1, CB8_CA1, CB9_CA1},
{0, CB7_CA2, CB8_CA2, CB9_CA2},
{0, CB7_CA3, CB8_CA3, CB9_CA3},
{0, CB7_CA4, CB8_CA4, CB9_CA4},
{0, CB7_CA5, CB8_CA5, CB9_CA5},
{0, CB7_CA6, CB8_CA6, CB9_CA6},
{0, CB7_CA7, CB8_CA7, CB9_CA7},
{0, CB7_CA8, CB8_CA8, CB9_CA8},
{0, CB7_CA9, CB8_CA9, CB9_CA9},
{0, CB7_CA10, CB8_CA10, CB9_CA10},
{0, CB7_CA11, CB8_CA11, CB9_CA11},
{0, CB7_CA12, CB8_CA12, CB9_CA12},
{0, CB1_CA15, CB2_CA15, CB3_CA15},
{0, CB7_CA13, CB8_CA13, CB9_CA13},
{1, CB4_CA3, CB5_CA3, CB6_CA3},

{0, CB10_CA1, CB11_CA1, CB12_CA1},
{0, CB1_CA16, CB2_CA16, CB3_CA16},
{0, CB10_CA2, CB11_CA2, CB12_CA2},
{0, CB10_CA3, CB11_CA3, CB12_CA3},
{0, CB10_CA4, CB11_CA4, CB12_CA4},
{0, CB10_CA5, CB11_CA5, CB12_CA5},
{0, CB10_CA6, CB11_CA6, CB12_CA6},
{0, CB10_CA7, CB11_CA7, CB12_CA7},
{0, CB10_CA8, CB11_CA8, CB12_CA8},
{0, CB10_CA9, CB11_CA9, CB12_CA9},
{0, CB10_CA10, CB11_CA10, CB12_CA10},
{0, CB10_CA11, CB11_CA11, CB12_CA11},
{0, CB10_CA12, CB11_CA12, CB12_CA12},
{1, CB4_CA7, CB5_CA7, CB6_CA7},
{1, CB4_CA4, CB5_CA4, CB6_CA4},

{0, CB10_CA13, CB11_CA13, CB12_CA13},
{0, CB10_CA14, CB11_CA14, CB12_CA14},
{0, CB10_CA15, CB11_CA15, CB12_CA15},
{0, CB10_CA16, CB11_CA16, CB12_CA16},

{0, CB7_CA14, CB8_CA14, CB9_CA14},
{0, CB7_CA15, CB8_CA15, CB9_CA15},
{0, CB7_CA16, CB8_CA16, CB9_CA16},

{0, CB4_CA15, CB5_CA15, CB6_CA15},
{1, CB4_CA6, CB5_CA6, CB6_CA6},
{1, CB4_CA5, CB5_CA5, CB6_CA5},

{1, CB7_CA1, CB8_CA1, CB9_CA1},
{1, CB7_CA2, CB8_CA2, CB9_CA2},
{1, CB7_CA3, CB8_CA3, CB9_CA3},
{1, CB7_CA4, CB8_CA4, CB9_CA4},
{1, CB7_CA5, CB8_CA5, CB9_CA5},
{1, CB7_CA6, CB8_CA6, CB9_CA6},
{1, CB7_CA7, CB8_CA7, CB9_CA7},
{1, CB7_CA8, CB8_CA8, CB9_CA8},
{1, CB7_CA9, CB8_CA9, CB9_CA9},
{1, CB7_CA10, CB8_CA10, CB9_CA10},
{1, CB7_CA11, CB8_CA11, CB9_CA11},

{1, CB10_CA1, CB11_CA1, CB12_CA1},
{1, CB10_CA2, CB11_CA2, CB12_CA2},
{1, CB10_CA3, CB11_CA3, CB12_CA3},
{1, CB10_CA4, CB11_CA4, CB12_CA4},
{1, CB10_CA5, CB11_CA5, CB12_CA5},
{1, CB10_CA6, CB11_CA6, CB12_CA6},
{1, CB10_CA7, CB11_CA7, CB12_CA7},
{1, CB10_CA8, CB11_CA8, CB12_CA8},
{1, CB10_CA9, CB11_CA9, CB12_CA9},
{1, CB10_CA10, CB11_CA10, CB12_CA10},
{1, CB10_CA11, CB11_CA11, CB12_CA11},
};

#endif
// clang-format on
void keyboard_pre_init_kb(void) {
// set our LED pings as output
gpio_set_pin_output(LED_MAC_OS_PIN); // LDE2 MAC\WIN
gpio_write_pin_low(LED_MAC_OS_PIN);
gpio_set_pin_output(LED_WIN_LOCK_PIN); // LED3 Win Lock
gpio_write_pin_low(LED_WIN_LOCK_PIN);

housekeeping_task_kb();
}

void housekeeping_task_kb(void) {
zvecr marked this conversation as resolved.
Show resolved Hide resolved
gpio_write_pin(LED_MAC_OS_PIN, ((get_highest_layer(default_layer_state | layer_state) == 2) || (get_highest_layer(default_layer_state | layer_state) == 3)));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is making the LED that's supposed to inform if the keyboard is on Mac or Windows have a strange behaviour: it informs we are on the default layer on Mac by turning on, but turns off if the FN key is pressed. On Windows, it turns off on default layer as expected, but will actually turn on when we press the FN key. Maybe something like this would be better:

Suggested change
gpio_write_pin(LED_MAC_OS_PIN, ((get_highest_layer(default_layer_state | layer_state) == 2) || (get_highest_layer(default_layer_state | layer_state) == 3)));
gpio_write_pin(LED_MAC_OS_PIN,
(get_highest_layer(default_layer_state | layer_state) == 3) ||
(get_highest_layer(default_layer_state | layer_state) == 4) ||
(get_highest_layer(default_layer_state | layer_state) == 5));

This will only turn the led on when any layer related to Mac is active.

gpio_write_pin(LED_WIN_LOCK_PIN, keymap_config.no_gui);
}

bool dip_switch_update_kb(uint8_t index, bool active) {
jonylee1986 marked this conversation as resolved.
Show resolved Hide resolved
if (!dip_switch_update_user(index, active)) {
return false;
}
switch (index) {
case 0:
if (active) {
set_single_persistent_default_layer(3);
} else {
set_single_persistent_default_layer(0);
}
break;
default:
break;
}
return true;
}
41 changes: 41 additions & 0 deletions keyboards/akko/5075/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/* Copyright (C) 2023 jonylee@hfd
*
* 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

/* Use 6 dynamic keymap layers */
#define DYNAMIC_KEYMAP_LAYER_COUNT 6

/*encoder resolution */
#define ENCODER_DEFAULT_POS 0x3
/* LED Indicators */
#define LED_MAC_OS_PIN C10
#define LED_WIN_LOCK_PIN C11

/* SPI Config for spi flash*/
#define SPI_DRIVER SPIDQ
#define SPI_SCK_PIN B3
#define SPI_MOSI_PIN B5
#define SPI_MISO_PIN B4
#define SPI_MOSI_PAL_MODE 5

#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12

/* I2C Config for LED Driver */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
#define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_VDDIO
#define I2C1_OPMODE OPMODE_I2C
#define I2C1_CLOCK_SPEED 400000 /* 400000 */
23 changes: 23 additions & 0 deletions keyboards/akko/5075/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* Copyright (C) 2022 jonylee@hfd
*
* 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>
Loading