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
9 changes: 8 additions & 1 deletion src/const/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const C = {
CONTROLLER_ATMEGA32U2: 0,
CONTROLLER_ATMEGA32U4: 1,
CONTROLLER_AT90USB1286: 2,
CONTROLLER_BLACKPILLV3: 3,

// Pins.
PINS: {
Expand All @@ -57,7 +58,13 @@ const C = {
'D0', 'D1', 'D2', 'D3', 'D4', 'D5', 'D6', 'D7',
'E0', 'E1', 'E2', 'E3', 'E4', 'E5', 'E6', 'E7',
'F0', 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7'
]
],
3: [ //CONTROLLER_BLACKPILLV3
'A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7',
'A8', 'A15', 'B0', 'B1', 'B3', 'B4', 'B5', 'B6',
'B7', 'B10', 'B12', 'B13', 'B14', 'B15', 'C13',
'C14', 'C15'
]
},

// Keycodes.
Expand Down
9 changes: 9 additions & 0 deletions src/files/generators/rules.mk.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class RulesMK extends Generator {
case C.CONTROLLER_ATMEGA32U2: mcu = 'atmega32u2'; break;
case C.CONTROLLER_ATMEGA32U4: mcu = 'atmega32u4'; break;
case C.CONTROLLER_AT90USB1286: mcu = 'at90usb1286'; break;
case C.CONTROLLER_BLACKPILLV3: mcu = 'STM32F411'; break;
}

let bootloaderSize;
Expand All @@ -24,6 +25,14 @@ class RulesMK extends Generator {
case C.BOOTLOADER_8192: bootloaderSize = '8192'; break;
}

if(keyboard.controller == C.CONTROLLER_BLACKPILLV3)
{
return {
'mcu': mcu,
'use_backlight': keyboard.pins.led ? 'yes' : 'no',
'use_rgb': keyboard.pins.rgb ? 'yes' : 'no'
};
}
return {
'mcu': mcu,
'bootloader_size': bootloaderSize,
Expand Down
4 changes: 4 additions & 0 deletions src/state/keyboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@ class Keyboard {
if (!overlappingPins) {
this.errors.push('There are overlapping pins.');
}
if(this._controller == C.CONTROLLER_BLACKPILLV3 && this.pins.row.some(p => (['C13', 'C14', 'C15']).includes(p)))
{
this.errors.push('C13 C14 C15 can not be used as row pins');
}

// Check to see if there are all the recommended keys in the keymap.
const inKeymap = new Set();
Expand Down
3 changes: 3 additions & 0 deletions src/ui/panes/pins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@ class Pins extends React.Component {
<option value={ C.CONTROLLER_ATMEGA32U2 }>ATmega32U2</option>
<option value={ C.CONTROLLER_ATMEGA32U4 }>ATmega32U4</option>
<option value={ C.CONTROLLER_AT90USB1286 }>AT90USB1286</option>
<option value={ C.CONTROLLER_BLACKPILLV3 }>BlackPillV3</option>
</select>
<Help>
<strong>ATmega32U2</strong>: Alps64
<br/>
<strong>ATmega32U4</strong>: Teensy 2.0, Pro Micro, GH60 (Most Common)
<br/>
<strong>AT90USB1286</strong>: Teensy++ 2.0
<br/>
<strong>BLACKPILLV3</strong>: WeAct BlackPill V3.0
</Help>
<div style={{ height: '1.5rem' }}/>
Configure the row and column pins.
Expand Down