diff options
Diffstat (limited to 'keyboards/ferris/0_2/bling/bling.c')
| -rw-r--r-- | keyboards/ferris/0_2/bling/bling.c | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/keyboards/ferris/0_2/bling/bling.c b/keyboards/ferris/0_2/bling/bling.c new file mode 100644 index 000000000..28ca92893 --- /dev/null +++ b/keyboards/ferris/0_2/bling/bling.c | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 Pierre Chevalier <pierrechevalier83@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #include "quantum.h" | ||
| 18 | |||
| 19 | #include "drivers/issi/is31fl3731.h" | ||
| 20 | |||
| 21 | /* | ||
| 22 | | Left || Right | | ||
| 23 | | | 3 | | 0 || 0 | | 3 | | | ||
| 24 | | 5 | | | || | | | 6 | | ||
| 25 | | | | | || | | | | | ||
| 26 | | | | | 1 || 1 | | | | | ||
| 27 | | | 4 | | || | | 4 | | | ||
| 28 | | 6 | | | 2 || 2 | | | 5 | | ||
| 29 | */ | ||
| 30 | const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | ||
| 31 | /* Refer to IS31 manual for these locations | ||
| 32 | * driver | ||
| 33 | * | R location | ||
| 34 | * | | G location | ||
| 35 | * | | | B location | ||
| 36 | * | | | | */ | ||
| 37 | {0, C9_10, C8_10, C7_10}, // Left RGB 5 | ||
| 38 | {0, C9_12, C8_12, C7_12}, // Left RGB 3 | ||
| 39 | {0, C9_15, C8_15, C6_14}, // Left RGB 0 | ||
| 40 | {1, C1_2, C2_2, C4_3}, // Right RGB 0 | ||
| 41 | {1, C1_5, C2_5, C3_5}, // Right RGB 3 | ||
| 42 | {1, C1_8, C2_8, C3_8}, // Right RGB 6 | ||
| 43 | {1, C1_7, C2_7, C3_7}, // Right RGB 5 | ||
| 44 | {1, C1_6, C2_6, C3_6}, // Right RGB 4 | ||
| 45 | {1, C1_3, C2_3, C3_3}, // Right RGB 1 | ||
| 46 | {1, C1_4, C2_4, C3_4}, // Right RGB 2 | ||
| 47 | {0, C9_13, C8_13, C7_13}, // Left RGB 2 | ||
| 48 | {0, C9_14, C8_14, C7_14}, // Left RGB 1 | ||
| 49 | {0, C9_11, C8_11, C7_11}, // Left RGB 4 | ||
| 50 | {0, C9_9, C8_9, C7_9}, // Left RGB 6 | ||
| 51 | }; | ||
| 52 | // clang-format off | ||
| 53 | led_config_t g_led_config = { | ||
| 54 | // Key Matrix to LED Index | ||
| 55 | { | ||
| 56 | {}, | ||
| 57 | }, { | ||
| 58 | // LED Index to Physical Position. The unit is roughly milimiters in the real world | ||
| 59 | // | Left || Right | | ||
| 60 | // x->| 10 | 32 | 64 || 160 | 192 | 214 | | ||
| 61 | // y |_____|_____|____||_____|_____|_____| | ||
| 62 | // 0 | | 1 | 2 || 3 | 4 | | | ||
| 63 | // 16 | 0 | | || | | 5 | | ||
| 64 | // 35 | | | 11 || 8 | | | | ||
| 65 | // 45 | | 12 | || | 7 | | | ||
| 66 | // 50 | 13 | | 10 || 9 | | 6 | | ||
| 67 | // 0 1 2 3 4 5 | ||
| 68 | {10, 16}, {32, 0}, {64, 0}, {160, 0}, {192, 0}, {214, 16}, | ||
| 69 | // 6 7 8 9 | ||
| 70 | {214, 50}, {192, 45}, {160, 35}, {160, 50}, | ||
| 71 | // 10 11 12 13 | ||
| 72 | {64, 50}, {64, 35}, {32, 45}, {10, 50}, | ||
| 73 | }, { | ||
| 74 | // LED Index to Flag | ||
| 75 | 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 | ||
| 76 | } | ||
| 77 | }; | ||
