aj0070/split-keyboard-half

A USB‑C–powered RP2040 keyboard controller board with 17-key diode-isolated matrix, QSPI flash, 12 MHz crystal, reset/boot controls, 3.3 V regulation, USB interface, and TRRS serial split connector.

Version
1.0.0
License
unset
Stars
0

Use with the tscircuit CLI

tsci is the tscircuit CLI. Install it with npm install -g tscircuit.

tsci clone aj0070/split-keyboard-half  # download the package files into ./split-keyboard-half
tsci add aj0070/split-keyboard-half    # add it to your project as @tsci/aj0070.split-keyboard-half

In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.

dist/index.cjs

'use strict';

var jsxRuntime = require('react/jsx-runtime');
var React = require('react');

const pinLabels$1 = {
    pin1: ["pin1"],
    pin2: ["pin2"]
};
const CPG151101S11 = (props) => {
    return (jsxRuntime.jsx("chip", { pinLabels: pinLabels$1, symbol: jsxRuntime.jsxs("symbol", { children: [jsxRuntime.jsx("port", { name: "pin1", pinNumber: 1, aliases: ["1"], direction: "left", schX: -0.5, schY: 0, schStemLength: 0.2 }), jsxRuntime.jsx("port", { name: "pin2", pinNumber: 2, aliases: ["2"], direction: "right", schX: 0.5, schY: 0, schStemLength: 0.2 }), jsxRuntime.jsx("schematicpath", { svgPath: "M -0.1 0 A 0.06 0.06 0 1 1 -0.1 -0.0002", strokeColor: "#880000" }), jsxRuntime.jsx("schematicpath", { svgPath: "M 0.2 0 A 0.06 0.06 0 1 1 0.2 -0.0002", strokeColor: "#880000" }), jsxRuntime.jsx("schematicpath", { points: [{ "x": -0.3, "y": 0 }, { "x": -0.22, "y": 0 }], strokeColor: "#880000" }), jsxRuntime.jsx("schematicpath", { points: [{ "x": -0.2, "y": 0.2 }, { "x": 0.2, "y": 0.2 }], strokeColor: "#880000" }), jsxRuntime.jsx("schematicpath", { points: [{ "x": 0, "y": 0.2 }, { "x": 0, "y": 0.3 }], strokeColor: "#880000" }), jsxRuntime.jsx("schematicpath", { points: [{ "x": 0.2, "y": 0 }, { "x": 0.3, "y": 0 }], strokeColor: "#880000" }), jsxRuntime.jsx("schematictext", { schX: 0, schY: 0.5, text: "{NAME}", fontSize: 0.2, anchor: "bottom_center" })] }), supplierPartNumbers: {
            "jlcpcb": [
                "C2803348"
            ]
        }, manufacturerPartNumber: "CPG151101S11", footprint: jsxRuntime.jsxs("footprint", { children: [jsxRuntime.jsx("hole", { pcbX: "3.175mm", pcbY: "-1.27mm", diameter: "2.999994mm" }), jsxRuntime.jsx("hole", { pcbX: "-3.175mm", pcbY: "1.27mm", diameter: "2.999994mm" }), jsxRuntime.jsx("smtpad", { portHints: ["pin2"], pcbX: "6.724904mm", pcbY: "-1.27mm", width: "2.8999942mm", height: "2.499995mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin1"], pcbX: "-6.724904mm", pcbY: "1.27mm", width: "2.8999942mm", height: "2.499995mm", shape: "rect" }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -5.461000000000013, "y": -0.4611370000000079 }, { "x": -5.461000000000013, "y": -2.9209999999999354 }, { "x": -5.461000000000013, "y": -2.9209999999999354 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 5.4500017999999955, "y": -2.950006799999869 }, { "x": -5.461000000000013, "y": -2.950006799999869 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 0.18298159999994823, "y": 1.0549889999999778 }, { "x": 5.450027199999909, "y": 1.0549889999999778 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 5.450027199999909, "y": 1.0549889999999778 }, { "x": 5.450027199999909, "y": 0.4611370000000079 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -2.944114000000127, "y": 2.9450030000000424 }, { "x": -5.461000000000013, "y": 2.9450030000000424 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -1.707006999999976, "y": 2.9450030000000424 }, { "x": -2.944114000000127, "y": 2.9450030000000424 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -1.7070069999998623, "y": 2.9450030000000424 }, { "x": -1.6908409246365181, "y": 2.6983076688486562 }, { "x": -1.6426126785172528, "y": 2.455833000726443 }, { "x": -1.5631474744046727, "y": 2.221727875323495 }, { "x": -1.453805007206256, "y": 1.9999979646854626 }, { "x": -1.3164561888188473, "y": 1.7944371938847326 }, { "x": -1.153451135761543, "y": 1.6085628248006287 }, { "x": -0.9675789573427664, "y": 1.445555273765649 }, { "x": -0.7620200324109874, "y": 1.3082036928298066 }, { "x": -0.5402915912621893, "y": 1.1988582457809116 }, { "x": -0.3061875338247546, "y": 1.1193898955031045 }, { "x": -0.06371351387110735, "y": 1.0711583907361728 }, { "x": 0.18298159999994823, "y": 1.054988999999864 }] }), jsxRuntime.jsx("silkscreentext", { text: "{NAME}", pcbX: "0mm", pcbY: "4.0226mm", anchorAlignment: "center", fontSize: "1mm" }), jsxRuntime.jsx("fabricationnotepath", { route: [{ "x": -5.400014600000077, "y": -0.09999979999997777 }, { "x": -5.400014600000077, "y": -1.0999977999999828 }, { "x": -5.384615381271374, "y": -1.3349444761017821 }, { "x": -5.338681209987271, "y": -1.5658711494360205 }, { "x": -5.262998032554037, "y": -1.788826600596849 }, { "x": -5.158860809120597, "y": -1.9999959999998964 }, { "x": -5.028051356452238, "y": -2.195766180674468 }, { "x": -4.872807860551461, "y": -2.3727874605514216 }, { "x": -4.695786580674508, "y": -2.5280309564521986 }, { "x": -4.500016399999936, "y": -2.658840409120444 }, { "x": -4.288847000596775, "y": -2.762977632553998 }, { "x": -4.06589154943606, "y": -2.838660809987232 }, { "x": -3.8349648761018216, "y": -2.8845949812713343 }, { "x": -3.6000182000000223, "y": -2.8999942000000374 }, { "x": -3.4999930000000177, "y": -2.8999942000000374 }, { "x": -3.1999935999999707, "y": -2.8999942000000374 }, { "x": 5.400014599999963, "y": -2.8999942000000374 }, { "x": 5.400014599999963, "y": -2.699994599999968 }, { "x": -3.4999930000000177, "y": -2.699994599999968 }, { "x": -3.6000182000000223, "y": -2.699994599999968 }, { "x": -3.850312843474171, "y": -2.6802959843495273 }, { "x": -4.094444402145655, "y": -2.621685182691408 }, { "x": -4.326401546813713, "y": -2.525605387480482 }, { "x": -4.540472722755112, "y": -2.3944224021454374 }, { "x": -4.731386787156907, "y": -2.231366387156754 }, { "x": -4.894442802145591, "y": -2.0404523227550726 }, { "x": -5.0256257874805215, "y": -1.82638114681356 }, { "x": -5.121705582691561, "y": -1.5944240021456153 }, { "x": -5.180316384349567, "y": -1.3502924434741317 }, { "x": -5.200015000000008, "y": -1.0999977999999828 }, { "x": -5.200015000000008, "y": -0.09999979999997777 }, { "x": -5.400014600000077, "y": -0.09999979999997777 }], strokeWidth: "0mm", isFilled: true, hasStroke: false }), jsxRuntime.jsx("fabricationnotepath", { route: [{ "x": 5.400014599999963, "y": 0.39999920000002476 }, { "x": 5.400014599999963, "y": 0.4999736000000894 }, { "x": 5.361952508916033, "y": 0.6913246536583983 }, { "x": 5.253560843998571, "y": 0.8535442439988401 }, { "x": 5.091341253658356, "y": 0.9619359089163027 }, { "x": 4.899990199999934, "y": 0.999998000000005 }, { "x": 0.19999960000006922, "y": 0.999998000000005 }, { "x": 0, "y": 0.999998000000005 }, { "x": -0.2349466761017993, "y": 1.0153972187287081 }, { "x": -0.46587334943603764, "y": 1.0613313900125831 }, { "x": -0.6888288005969798, "y": 1.1370145674459309 }, { "x": -0.899998200000141, "y": 1.241151790879485 }, { "x": -1.0957683806747127, "y": 1.3719612435478439 }, { "x": -1.2727896605514388, "y": 1.5272047394486208 }, { "x": -1.4280331564522157, "y": 1.7042260193254606 }, { "x": -1.5588426091206884, "y": 1.8999961999999186 }, { "x": -1.6629798325542424, "y": 2.1111655994031935 }, { "x": -1.7386630099874765, "y": 2.334121050564022 }, { "x": -1.7845971812714652, "y": 2.5650477238982603 }, { "x": -1.799996400000282, "y": 2.7999944000000596 }, { "x": -1.7999964000000546, "y": 2.999994000000015 }, { "x": -5.400014600000077, "y": 2.999994000000015 }, { "x": -5.400014600000077, "y": 2.7999944000000596 }, { "x": -1.99999600000001, "y": 2.7999944000000596 }, { "x": -1.99999600000001, "y": 2.5999947999999904 }, { "x": -1.984596781271307, "y": 2.365048123898191 }, { "x": -1.9386626099873183, "y": 2.1341214505640664 }, { "x": -1.8629794325539706, "y": 1.9111659994033516 }, { "x": -1.7588422091205302, "y": 1.6999966000000768 }, { "x": -1.6280327564521713, "y": 1.5042264193256187 }, { "x": -1.4727892605513944, "y": 1.3272051394486652 }, { "x": -1.2957679806744409, "y": 1.1719616435477747 }, { "x": -1.0999978000000965, "y": 1.0411521908795294 }, { "x": -0.8888284005968217, "y": 0.937014967446089 }, { "x": -0.6658729494358795, "y": 0.861331790012855 }, { "x": -0.43494627610186853, "y": 0.8153976187287526 }, { "x": -0.1999996000001829, "y": 0.7999984000000495 }, { "x": 4.800015799999983, "y": 0.7999984000000495 }, { "x": 5.000015400000052, "y": 0.7464086686935616 }, { "x": 5.146425268693292, "y": 0.5999987999999803 }, { "x": 5.20001499999978, "y": 0.39999920000002476 }, { "x": 5.400014599999963, "y": 0.39999920000002476 }], strokeWidth: "0mm", isFilled: true, hasStroke: false }), jsxRuntime.jsx("courtyardoutline", { outline: [{ "x": -8.424901100000056, "y": 3.1950030000000424 }, { "x": 8.424901099999943, "y": 3.1950030000000424 }, { "x": 8.424901099999943, "y": -3.1950030000000424 }, { "x": -8.424901100000056, "y": -3.1950030000000424 }, { "x": -8.424901100000056, "y": 3.1950030000000424 }] })] }), cadModel: {
            objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2803348.obj?uuid=b226c46d9f4847bc837da2470e6ffcc9",
            stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2803348.step?uuid=b226c46d9f4847bc837da2470e6ffcc9",
            pcbRotationOffset: 0,
            modelOriginPosition: { x: -12699999956566899e-21, y: 0, z: -0.05000240000000011 },
        }, ...props }));
};

const pinLabels = {
    pin1: ["pin1"],
    pin2: ["pin2"],
    pin3: ["pin3"],
    pin4: ["pin4"]
};
const HC_PJ_320A_4P_D = (props) => {
    return (jsxRuntime.jsx("chip", { pinLabels: pinLabels, symbol: jsxRuntime.jsxs("symbol", { children: [jsxRuntime.jsx("schematicpath", { points: [{ "x": -0.1, "y": -0.6 }, { "x": 0.32, "y": -0.6 }, { "x": 0.38, "y": -0.5 }, { "x": 0.44, "y": -0.6 }], strokeColor: "#880000" }), jsxRuntime.jsx("schematicpath", { points: [{ "x": -0.2, "y": 0.2 }, { "x": 0.22, "y": 0.2 }, { "x": 0.28, "y": 0.1 }, { "x": 0.34, "y": 0.2 }], strokeColor: "#880000" }), jsxRuntime.jsx("schematicpath", { points: [{ "x": -0.2, "y": 0.6 }, { "x": 0.56, "y": 0.6 }, { "x": 0.56, "y": 0.3 }], strokeColor: "#880000" }), jsxRuntime.jsx("schematicrect", { schX: 0.56, schY: -0.35, width: 0.08, height: 0.3, strokeWidth: 0.02, color: "#880000" }), jsxRuntime.jsx("port", { name: "pin4", pinNumber: 4, aliases: ["4"], direction: "left", schX: -0.4, schY: -0.6, schStemLength: 0.2 }), jsxRuntime.jsx("port", { name: "pin3", pinNumber: 3, aliases: ["3"], direction: "left", schX: -0.4, schY: -0.2, schStemLength: 0.2 }), jsxRuntime.jsx("port", { name: "pin2", pinNumber: 2, aliases: ["2"], direction: "left", schX: -0.4, schY: 0.2, schStemLength: 0.2 }), jsxRuntime.jsx("port", { name: "pin1", pinNumber: 1, aliases: ["1"], direction: "left", schX: -0.4, schY: 0.6, schStemLength: 0.2 }), jsxRuntime.jsx("schematicpath", { points: [{ "x": -0.2, "y": -0.2 }, { "x": 0.12, "y": -0.2 }, { "x": 0.18, "y": -0.1 }, { "x": 0.24, "y": -0.2 }], strokeColor: "#880000" }), jsxRuntime.jsx("schematicpath", { points: [{ "x": -0.2, "y": -0.6 }, { "x": -0.1, "y": -0.6 }], strokeColor: "#880000" }), jsxRuntime.jsx("schematicpath", { points: [{ "x": 0.56, "y": 0.3 }, { "x": 0.56, "y": -0.2 }], strokeColor: "#880000" }), jsxRuntime.jsx("schematictext", { schX: 0.085, schY: 1.01, text: "{NAME}", fontSize: 0.2, anchor: "bottom_center" })] }), supplierPartNumbers: {
            "jlcpcb": [
                "C5372851"
            ]
        }, manufacturerPartNumber: "HC-PJ-320A-4P-D", footprint: jsxRuntime.jsxs("footprint", { children: [jsxRuntime.jsx("hole", { pcbX: "2.2750335mm", pcbY: "0mm", diameter: "0.999998mm" }), jsxRuntime.jsx("hole", { pcbX: "-4.7249525mm", pcbY: "0mm", diameter: "0.999998mm" }), jsxRuntime.jsx("platedhole", { portHints: ["pin4"], pcbX: "4.0748775mm", pcbY: "2.249932mm", holeWidth: "0.5000244mm", holeHeight: "1.499997mm", outerWidth: "1.0999978mm", outerHeight: "2.0999958mm", pcbRotation: "90deg", shape: "pill" }), jsxRuntime.jsx("platedhole", { portHints: ["pin3"], pcbX: "-0.0249365mm", pcbY: "2.249932mm", holeWidth: "0.5000244mm", holeHeight: "1.499997mm", outerWidth: "1.0999978mm", outerHeight: "2.0999958mm", pcbRotation: "90deg", shape: "pill" }), jsxRuntime.jsx("platedhole", { portHints: ["pin2"], pcbX: "-3.1250065mm", pcbY: "2.249932mm", holeWidth: "0.5000244mm", holeHeight: "1.499997mm", outerWidth: "1.0999978mm", outerHeight: "2.0999958mm", pcbRotation: "90deg", shape: "pill" }), jsxRuntime.jsx("platedhole", { portHints: ["pin1"], pcbX: "5.1749515mm", pcbY: "-2.249932mm", holeWidth: "0.5000244mm", holeHeight: "1.499997mm", outerWidth: "1.0999978mm", outerHeight: "2.0999958mm", pcbRotation: "90deg", shape: "pill" }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -8.325021500000048, "y": 2.4999950000001263 }, { "x": -6.325025500000038, "y": 2.4999950000001263 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -8.325021500000048, "y": 2.4999950000001263 }, { "x": -8.325021500000048, "y": -2.4999950000000126 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -6.325025500000038, "y": -2.999994000000015 }, { "x": 4.463370499999883, "y": -2.999994000000015 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -3.8367399000001114, "y": 2.999994000000015 }, { "x": -6.325025500000038, "y": 2.999994000000015 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -0.7367461000000048, "y": 2.999994000000015 }, { "x": -2.4133747000000767, "y": 2.999994000000015 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 3.363245699999993, "y": 2.999994000000015 }, { "x": 0.6866191000000299, "y": 2.999994000000015 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 5.724963099999854, "y": 2.999994000000015 }, { "x": 4.786610900000028, "y": 2.999994000000015 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 5.724963099999854, "y": 2.999994000000015 }, { "x": 5.724963099999854, "y": -1.4704821999998785 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -6.325025500000038, "y": 2.999994000000015 }, { "x": -6.325025500000038, "y": -2.999994000000015 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -8.325021500000048, "y": -2.4999950000000126 }, { "x": -6.325025500000038, "y": -2.4999950000000126 }] }), jsxRuntime.jsx("silkscreentext", { text: "{NAME}", pcbX: "-1.3023025mm", pcbY: "3.9972mm", anchorAlignment: "center", fontSize: "1mm" }), jsxRuntime.jsx("courtyardoutline", { outline: [{ "x": -8.574996100000021, "y": 3.249994000000015 }, { "x": 6.474949400000014, "y": 3.249994000000015 }, { "x": 6.474949400000014, "y": -3.249994000000015 }, { "x": -8.574996100000021, "y": -3.249994000000015 }, { "x": -8.574996100000021, "y": 3.249994000000015 }] })] }), cadModel: {
            objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C5372851.obj?uuid=1dc42aa828974c2a86f6a8c3fb540c91",
            stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C5372851.step?uuid=1dc42aa828974c2a86f6a8c3fb540c91",
            pcbRotationOffset: 0,
            modelOriginPosition: { x: 6.8250038000000135, y: 0.000050000000000105516, z: -2.500006 },
        }, ...props }));
};

const rp2040PinLabels = {
    pin1: "IOVDD6",
    pin2: "GPIO0",
    pin3: "GPIO1",
    pin4: "GPIO2",
    pin5: "GPIO3",
    pin6: "GPIO4",
    pin7: "GPIO5",
    pin8: "GPIO6",
    pin9: "GPIO7",
    pin10: "IOVDD5",
    pin11: "GPIO8",
    pin12: "GPIO9",
    pin13: "GPIO10",
    pin14: "GPIO11",
    pin15: "GPIO12",
    pin16: "GPIO13",
    pin17: "GPIO14",
    pin18: "GPIO15",
    pin19: "TESTEN",
    pin20: "XIN",
    pin21: "XOUT",
    pin22: "IOVDD4",
    pin23: "DVDD2",
    pin24: "SWCLK",
    pin25: "SWD",
    pin26: "RUN",
    pin27: "GPIO16",
    pin28: "GPIO17",
    pin29: "GPIO18",
    pin30: "GPIO19",
    pin31: "GPIO20",
    pin32: "GPIO21",
    pin33: "IOVDD3",
    pin34: "GPIO22",
    pin35: "GPIO23",
    pin36: "GPIO24",
    pin37: "GPIO25",
    pin38: "GPIO26_ADC0",
    pin39: "GPIO27_ADC1",
    pin40: "GPIO28_ADC2",
    pin41: "GPIO29_ADC3",
    pin42: "IOVDD2",
    pin43: "ADC_AVDD",
    pin44: "VREG_IN",
    pin45: "VREG_VOUT",
    pin46: "USB_DM",
    pin47: "USB_DP",
    pin48: "USB_VDD",
    pin49: "IOVDD1",
    pin50: "DVDD1",
    pin51: "QSPI_SD3",
    pin52: "QSPI_SCLK",
    pin53: "QSPI_SD0",
    pin54: "QSPI_SD2",
    pin55: "QSPI_SD1",
    pin56: "QSPI_SS",
    pin57: "GND",
};
const RP2040 = (props) => (jsxRuntime.jsx("chip", { ...props, pinLabels: rp2040PinLabels, manufacturerPartNumber: "RP2040", footprint: "qfn56_thermalpad3.1mmx3.1mm_p0.4001mm_w7.8999mm_h7.9001mm_pw0.2mm_pl0.85mm", pinAttributes: {
        IOVDD1: { requiresPower: true, mustBeConnected: true },
        IOVDD2: { requiresPower: true, mustBeConnected: true },
        IOVDD3: { requiresPower: true, mustBeConnected: true },
        IOVDD4: { requiresPower: true, mustBeConnected: true },
        IOVDD5: { requiresPower: true, mustBeConnected: true },
        IOVDD6: { requiresPower: true, mustBeConnected: true },
        DVDD1: { requiresPower: true, mustBeConnected: true },
        DVDD2: { requiresPower: true, mustBeConnected: true },
        VREG_IN: { requiresPower: true, mustBeConnected: true },
        VREG_VOUT: { providesPower: true, mustBeConnected: true },
        USB_VDD: { requiresPower: true, mustBeConnected: true },
        ADC_AVDD: { requiresPower: true, mustBeConnected: true },
        GND: { requiresGround: true, mustBeConnected: true },
        RUN: { mustBeConnected: true },
        XIN: { mustBeConnected: true },
        XOUT: { mustBeConnected: true },
        QSPI_SS: { mustBeConnected: true },
        QSPI_SCLK: { mustBeConnected: true },
        QSPI_SD0: { mustBeConnected: true },
        QSPI_SD1: { mustBeConnected: true },
        QSPI_SD2: { mustBeConnected: true },
        QSPI_SD3: { mustBeConnected: true },
    } }));
const COLS = [-48.5, -29.45, -10.4, 8.65, 27.7];
const ROW_BASE = [22, 2.95, -16.1];
const STAGGER = [-2, 0, 2, 1, -2];
const gridKeys = ROW_BASE.flatMap((ry, r) => COLS.map((cx, c) => ({
    id: `R${r}C${c}`,
    x: cx,
    y: ry + STAGGER[c],
    row: r,
    col: c,
})));
const thumbKeys = [
    { id: "T0", x: -8, y: -33, row: 3, col: 2 },
    { id: "T1", x: 10, y: -33, row: 3, col: 3 },
    { id: "T2", x: 28, y: -33, row: 3, col: 4 },
];
const keys = [...gridKeys, ...thumbKeys];
const keySchematic = (i) => ({
    schX: -11.25 + (i % 6) * 4.5,
    schY: 6 - Math.floor(i / 6) * 6,
});
const schFix = {
    R2C2: { sx: 0.21, sy: -7.58, dx: 1.09, dy: -10.2 },
    R2C3: { sx: -2.1, sy: -11.99 },
    T0: { sx: 1.33, sy: -12.41, dx: -0.24, dy: -12.57 },
    T1: { sx: 1.33, sy: -11.87 },
};
const decouplingX = [-7, -4.6, -2.2, 0.2, 2.6, 5, 7.4, 9.8, 12.2, 14.6, 17];
var index_circuit = () => (jsxRuntime.jsxs("board", { width: "120mm", height: "95mm", layers: 2, title: "Split Keyboard Left Half", schAutoLayoutEnabled: false, routeRemaining: true, children: [jsxRuntime.jsx("schematicsheet", { name: "matrix", displayName: "Key Matrix", sheetIndex: 0 }), jsxRuntime.jsx("schematicsheet", { name: "mcu", displayName: "RP2040, Clock, Flash", sheetIndex: 1 }), jsxRuntime.jsx("schematicsheet", { name: "power", displayName: "USB-C, Power, TRRS", sheetIndex: 2 }), jsxRuntime.jsx("schematicsection", { name: "keymatrix", displayName: "Key matrix" }), jsxRuntime.jsx("schematicsection", { name: "mcu_power", displayName: "RP2040 supply" }), jsxRuntime.jsx("schematicsection", { name: "clock", displayName: "12 MHz crystal" }), jsxRuntime.jsx("schematicsection", { name: "qspi", displayName: "QSPI flash" }), jsxRuntime.jsx("schematicsection", { name: "reset", displayName: "Reset and boot" }), jsxRuntime.jsx("schematicsection", { name: "usbc", displayName: "USB-C" }), jsxRuntime.jsx("schematicsection", { name: "ldo", displayName: "3.3 V LDO" }), jsxRuntime.jsx("schematicsection", { name: "trrs", displayName: "TRRS split link" }), jsxRuntime.jsx("net", { name: "GND", isGroundNet: true, nominalTraceWidth: 0.4 }), jsxRuntime.jsx("net", { name: "V3_3", isPowerNet: true, nominalTraceWidth: 0.5 }), jsxRuntime.jsx("net", { name: "VBUS", isPowerNet: true, nominalTraceWidth: 0.5 }), jsxRuntime.jsx("net", { name: "V1_1", isPowerNet: true, nominalTraceWidth: 0.4 }), jsxRuntime.jsx("net", { name: "USB_DP" }), jsxRuntime.jsx("net", { name: "USB_DM" }), jsxRuntime.jsx("net", { name: "USB_DP_C" }), jsxRuntime.jsx("net", { name: "USB_DM_C" }), jsxRuntime.jsx("net", { name: "XIN" }), jsxRuntime.jsx("net", { name: "XOUT" }), jsxRuntime.jsx("net", { name: "XOUT_XTAL" }), jsxRuntime.jsx("net", { name: "QSPI_SS" }), jsxRuntime.jsx("net", { name: "QSPI_SCLK" }), jsxRuntime.jsx("net", { name: "QSPI_SD0" }), jsxRuntime.jsx("net", { name: "QSPI_SD1" }), jsxRuntime.jsx("net", { name: "QSPI_SD2" }), jsxRuntime.jsx("net", { name: "QSPI_SD3" }), jsxRuntime.jsx("net", { name: "RUN" }), jsxRuntime.jsx("net", { name: "BOOTSEL" }), jsxRuntime.jsx("net", { name: "SERIAL" }), jsxRuntime.jsx("net", { name: "COL0" }), jsxRuntime.jsx("net", { name: "COL1" }), jsxRuntime.jsx("net", { name: "COL2" }), jsxRuntime.jsx("net", { name: "COL3" }), jsxRuntime.jsx("net", { name: "COL4" }), jsxRuntime.jsx("net", { name: "ROW0" }), jsxRuntime.jsx("net", { name: "ROW1" }), jsxRuntime.jsx("net", { name: "ROW2" }), jsxRuntime.jsx("net", { name: "ROW3" }), keys.map((k, i) => {
            const s = keySchematic(i);
            const f = schFix[k.id] ?? {};
            return (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(CPG151101S11, { name: `SW_${k.id}`, pcbX: k.x, pcbY: k.y, schSheetName: "matrix", schSectionName: "keymatrix", schX: f.sx ?? s.schX, schY: f.sy ?? s.schY + 1 }), jsxRuntime.jsx("diode", { name: `D_${k.id}`, manufacturerPartNumber: "1N4148W", footprint: "sod123", pcbX: k.x, pcbY: k.y - 8.7, pcbRotation: 180, schSheetName: "matrix", schSectionName: "keymatrix", schX: f.dx ?? s.schX, schY: f.dy ?? s.schY - 1.5, schRotation: 90 })] }, k.id));
        }), keys.map((k) => (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx("trace", { from: `SW_${k.id}.pin1`, to: `net.COL${k.col}` }), jsxRuntime.jsx("trace", { from: `SW_${k.id}.pin2`, to: `D_${k.id}.anode` }), jsxRuntime.jsx("trace", { from: `D_${k.id}.cathode`, to: `net.ROW${k.row}` })] }, `w_${k.id}`))), jsxRuntime.jsx("hole", { name: "MH1", diameter: "2.2mm", pcbX: -38.975, pcbY: -7.575 }), jsxRuntime.jsx("hole", { name: "MH2", diameter: "2.2mm", pcbX: -19.925, pcbY: -5.575 }), jsxRuntime.jsx("hole", { name: "MH3", diameter: "2.2mm", pcbX: 0.875, pcbY: -5.075 }), jsxRuntime.jsx("hole", { name: "MH4", diameter: "2.2mm", pcbX: 18.175, pcbY: -7.075 }), jsxRuntime.jsx(RP2040, { name: "U1", pcbX: -13, pcbY: 40.5, schSheetName: "mcu", schSectionName: "mcu_power", schX: -4, schY: 2, noConnect: [
                "GPIO10",
                "GPIO11",
                "GPIO12",
                "GPIO13",
                "GPIO14",
                "GPIO15",
                "GPIO16",
                "GPIO17",
                "GPIO18",
                "GPIO19",
                "GPIO20",
                "GPIO21",
                "GPIO22",
                "GPIO23",
                "GPIO24",
                "GPIO25",
                "GPIO26_ADC0",
                "GPIO27_ADC1",
                "GPIO28_ADC2",
                "GPIO29_ADC3",
                "SWCLK",
                "SWD",
            ] }), jsxRuntime.jsx("connector", { name: "J1", standard: "usb_c", allowOffBoard: true, pcbX: -46, pcbY: 42.575, pcbRotation: 180, schSheetName: "power", schSectionName: "usbc", schX: -10, schY: 4, noConnect: ["SBU1", "SBU2"], schWidth: 1.575 }), jsxRuntime.jsx("resistor", { name: "R1", resistance: "5.1k", footprint: "0402", pcbX: -40.04, pcbY: 41.6, pcbRotation: 270, schSheetName: "power", schSectionName: "usbc", schX: -6.5, schY: 2, schRotation: 270 }), jsxRuntime.jsx("resistor", { name: "R2", resistance: "5.1k", footprint: "0402", pcbX: -40.04, pcbY: 39.2, pcbRotation: 90, schSheetName: "power", schSectionName: "usbc", schX: -6.17, schY: 0.2, schRotation: 270 }), jsxRuntime.jsx("resistor", { name: "R3", resistance: "27", footprint: "0402", pcbX: -22, pcbY: 46, schSheetName: "power", schSectionName: "usbc", schX: -2.5, schY: -1.2 }), jsxRuntime.jsx("resistor", { name: "R4", resistance: "27", footprint: "0402", pcbX: -24.5, pcbY: 46, schSheetName: "power", schSectionName: "usbc", schX: -2.5, schY: -2.8 }), jsxRuntime.jsx("chip", { name: "U3", manufacturerPartNumber: "AP2112K-3.3TRG1", footprint: "sot23_5", pinLabels: { pin1: "VIN", pin2: "GND", pin3: "EN", pin4: "NC", pin5: "VOUT" }, pinAttributes: { VIN: { requiresPower: true }, VOUT: { providesPower: true } }, noConnect: ["NC"], pcbX: -36.5, pcbY: 44, schSheetName: "power", schSectionName: "ldo", schX: -3, schY: 6 }), jsxRuntime.jsx("capacitor", { name: "C1", capacitance: "10uF", footprint: "0805", pcbX: -31.8, pcbY: 44.3, pcbRotation: 90, schSheetName: "power", schSectionName: "ldo", schX: -0.5, schY: 7.2, schRotation: 270 }), jsxRuntime.jsx("capacitor", { name: "C2", capacitance: "100nF", footprint: "0402", pcbX: -29.4, pcbY: 44.3, pcbRotation: 90, schSheetName: "power", schSectionName: "ldo", schX: 0.9, schY: 7.2, schRotation: 270 }), jsxRuntime.jsx("capacitor", { name: "C3", capacitance: "10uF", footprint: "0805", pcbX: -26.8, pcbY: 44.3, pcbRotation: 90, schSheetName: "power", schSectionName: "ldo", schX: 2.6, schY: 7.2, schRotation: 270 }), jsxRuntime.jsx("capacitor", { name: "C4", capacitance: "100nF", footprint: "0402", pcbX: -24.4, pcbY: 44.3, pcbRotation: 90, schSheetName: "power", schSectionName: "ldo", schX: 4.0, schY: 7.2, schRotation: 270 }), jsxRuntime.jsx(HC_PJ_320A_4P_D, { name: "J2", pcbX: 51.2, pcbY: -8, pcbRotation: 180, schSheetName: "power", schSectionName: "trrs", schX: 8, schY: -2 }), jsxRuntime.jsx("crystal", { name: "X1", frequency: "12MHz", loadCapacitance: "15pF", pinVariant: "four_pin", footprint: "crystal4_px3.2mm_py2.5mm", pcbX: -13.4, pcbY: 30.6, pcbRotation: 270, schSheetName: "mcu", schSectionName: "clock", schX: 3, schY: -4 }), jsxRuntime.jsx("capacitor", { name: "C19", capacitance: "15pF", footprint: "0402", pcbX: -17.8, pcbY: 31.0, pcbRotation: 270, schSheetName: "mcu", schSectionName: "clock", schX: 0.5, schY: -5, schRotation: 270 }), jsxRuntime.jsx("capacitor", { name: "C20", capacitance: "15pF", footprint: "0402", pcbX: -7.5, pcbY: 31.0, pcbRotation: 270, schSheetName: "mcu", schSectionName: "clock", schX: 5.5, schY: -5, schRotation: 270 }), jsxRuntime.jsx("resistor", { name: "R7", resistance: "1k", footprint: "0402", pcbX: -10.1, pcbY: 31.0, pcbRotation: 90, schSheetName: "mcu", schSectionName: "clock", schX: 6.5, schY: -4 }), jsxRuntime.jsx("chip", { name: "U2", manufacturerPartNumber: "W25Q128JVSIQ", footprint: "soic8_p1.27mm", pinLabels: { pin1: "CS", pin2: "DO", pin3: "WP", pin4: "GND", pin5: "DI", pin6: "CLK", pin7: "HOLD", pin8: "VCC" }, pinAttributes: { VCC: { requiresPower: true }, GND: { requiresGround: true } }, pcbX: 7.8, pcbY: 42.5, schSheetName: "mcu", schSectionName: "qspi", schX: 8, schY: 4 }), jsxRuntime.jsx("capacitor", { name: "C18", capacitance: "100nF", footprint: "0402", pcbX: 12.8, pcbY: 42.5, pcbRotation: 270, schSheetName: "mcu", schSectionName: "qspi", schX: 10.8, schY: 4, schRotation: 270 }), jsxRuntime.jsx("pushbutton", { name: "SW2", footprint: "smdpushbutton", pcbX: 15, pcbY: 37.5, schSheetName: "mcu", schSectionName: "reset", schX: -11, schY: 5 }), jsxRuntime.jsx("resistor", { name: "R8", resistance: "10k", footprint: "0402", pcbX: 10.8, pcbY: 37.5, schSheetName: "mcu", schSectionName: "reset", schX: -14, schY: 5, schRotation: 270 }), jsxRuntime.jsx("pushbutton", { name: "SW1", footprint: "smdpushbutton", pcbX: 21, pcbY: 37.5, schSheetName: "mcu", schSectionName: "reset", schX: -11, schY: 2 }), jsxRuntime.jsx("resistor", { name: "R9", resistance: "1k", footprint: "0402", pcbX: 25.7, pcbY: 37.5, schSheetName: "mcu", schSectionName: "reset", schX: -14, schY: 2, schRotation: 270 }), ["100nF", "100nF", "100nF", "100nF", "100nF", "100nF", "100nF", "100nF", "1uF", "100nF", "100nF"].map((value, i) => (jsxRuntime.jsx("capacitor", { name: `C${i + 5}`, capacitance: value, footprint: value === "1uF" ? "0603" : "0402", pcbX: decouplingX[i], pcbY: i === 8 ? 34.2 : 34.6, pcbRotation: 90, schSheetName: "mcu", schSectionName: "mcu_power", schX: -12 + i * 2.4, schY: -2.6, schRotation: 270 }, i))), jsxRuntime.jsx("trace", { from: "J1.VBUS1", to: "net.VBUS" }), jsxRuntime.jsx("trace", { from: "J1.VBUS2", to: "net.VBUS" }), jsxRuntime.jsx("trace", { from: "J1.GND1", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "J1.GND2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "J1.SHELL1", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "J1.SHELL2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "J1.CC1", to: "R1.pin1" }), jsxRuntime.jsx("trace", { from: "R1.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "J1.CC2", to: "R2.pin1" }), jsxRuntime.jsx("trace", { from: "R2.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "J1.DP1", to: "net.USB_DP_C" }), jsxRuntime.jsx("trace", { from: "J1.DP2", to: "net.USB_DP_C" }), jsxRuntime.jsx("trace", { from: "J1.DM1", to: "net.USB_DM_C" }), jsxRuntime.jsx("trace", { from: "J1.DM2", to: "net.USB_DM_C" }), jsxRuntime.jsx("trace", { from: "net.USB_DP_C", to: "R3.pin1" }), jsxRuntime.jsx("trace", { from: "R3.pin2", to: "net.USB_DP" }), jsxRuntime.jsx("trace", { from: "net.USB_DM_C", to: "R4.pin1" }), jsxRuntime.jsx("trace", { from: "R4.pin2", to: "net.USB_DM" }), jsxRuntime.jsx("trace", { from: "net.USB_DP", to: "U1.USB_DP" }), jsxRuntime.jsx("trace", { from: "net.USB_DM", to: "U1.USB_DM" }), jsxRuntime.jsx("trace", { from: "net.VBUS", to: "C1.pin1" }), jsxRuntime.jsx("trace", { from: "C1.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "net.VBUS", to: "C2.pin1" }), jsxRuntime.jsx("trace", { from: "C2.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "net.VBUS", to: "U3.VIN" }), jsxRuntime.jsx("trace", { from: "U3.EN", to: "net.VBUS" }), jsxRuntime.jsx("trace", { from: "U3.GND", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "U3.VOUT", to: "net.V3_3" }), jsxRuntime.jsx("trace", { from: "net.V3_3", to: "C3.pin1" }), jsxRuntime.jsx("trace", { from: "C3.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "net.V3_3", to: "C4.pin1" }), jsxRuntime.jsx("trace", { from: "C4.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "U1.IOVDD1", to: "net.V3_3" }), jsxRuntime.jsx("trace", { from: "U1.IOVDD2", to: "net.V3_3" }), jsxRuntime.jsx("trace", { from: "U1.IOVDD3", to: "net.V3_3" }), jsxRuntime.jsx("trace", { from: "U1.IOVDD4", to: "net.V3_3" }), jsxRuntime.jsx("trace", { from: "U1.IOVDD5", to: "net.V3_3" }), jsxRuntime.jsx("trace", { from: "U1.IOVDD6", to: "net.V3_3" }), jsxRuntime.jsx("trace", { from: "U1.VREG_IN", to: "net.V3_3" }), jsxRuntime.jsx("trace", { from: "U1.USB_VDD", to: "net.V3_3" }), jsxRuntime.jsx("trace", { from: "U1.ADC_AVDD", to: "net.V3_3" }), jsxRuntime.jsx("trace", { from: "U1.GND", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "U1.TESTEN", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "U1.VREG_VOUT", to: "net.V1_1" }), jsxRuntime.jsx("trace", { from: "U1.DVDD1", to: "net.V1_1" }), jsxRuntime.jsx("trace", { from: "U1.DVDD2", to: "net.V1_1" }), jsxRuntime.jsx("trace", { from: "U1.XIN", to: "net.XIN" }), jsxRuntime.jsx("trace", { from: "net.XIN", to: "X1.pin1" }), jsxRuntime.jsx("trace", { from: "X1.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "X1.pin4", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "U1.XOUT", to: "net.XOUT" }), jsxRuntime.jsx("trace", { from: "net.XOUT", to: "R7.pin1" }), jsxRuntime.jsx("trace", { from: "R7.pin2", to: "net.XOUT_XTAL" }), jsxRuntime.jsx("trace", { from: "net.XOUT_XTAL", to: "X1.pin3" }), jsxRuntime.jsx("trace", { from: "net.XIN", to: "C19.pin1" }), jsxRuntime.jsx("trace", { from: "C19.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "net.XOUT_XTAL", to: "C20.pin1" }), jsxRuntime.jsx("trace", { from: "C20.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "net.V3_3", to: "R8.pin1" }), jsxRuntime.jsx("trace", { from: "R8.pin2", to: "net.RUN" }), jsxRuntime.jsx("trace", { from: "net.RUN", to: "U1.RUN" }), jsxRuntime.jsx("trace", { from: "net.RUN", to: "SW2.pin1" }), jsxRuntime.jsx("trace", { from: "SW2.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "SW2.pin3", to: "net.RUN" }), jsxRuntime.jsx("trace", { from: "SW2.pin4", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "net.QSPI_SS", to: "U1.QSPI_SS" }), jsxRuntime.jsx("trace", { from: "net.QSPI_SCLK", to: "U1.QSPI_SCLK" }), jsxRuntime.jsx("trace", { from: "net.QSPI_SD0", to: "U1.QSPI_SD0" }), jsxRuntime.jsx("trace", { from: "net.QSPI_SD1", to: "U1.QSPI_SD1" }), jsxRuntime.jsx("trace", { from: "net.QSPI_SD2", to: "U1.QSPI_SD2" }), jsxRuntime.jsx("trace", { from: "net.QSPI_SD3", to: "U1.QSPI_SD3" }), jsxRuntime.jsx("trace", { from: "net.QSPI_SS", to: "U2.CS" }), jsxRuntime.jsx("trace", { from: "net.QSPI_SCLK", to: "U2.CLK" }), jsxRuntime.jsx("trace", { from: "net.QSPI_SD0", to: "U2.DI" }), jsxRuntime.jsx("trace", { from: "net.QSPI_SD1", to: "U2.DO" }), jsxRuntime.jsx("trace", { from: "net.QSPI_SD2", to: "U2.WP" }), jsxRuntime.jsx("trace", { from: "net.QSPI_SD3", to: "U2.HOLD" }), jsxRuntime.jsx("trace", { from: "net.V3_3", to: "U2.VCC" }), jsxRuntime.jsx("trace", { from: "U2.GND", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "net.V3_3", to: "C18.pin1" }), jsxRuntime.jsx("trace", { from: "C18.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "net.QSPI_SS", to: "R9.pin1" }), jsxRuntime.jsx("trace", { from: "R9.pin2", to: "net.BOOTSEL" }), jsxRuntime.jsx("trace", { from: "net.BOOTSEL", to: "SW1.pin1" }), jsxRuntime.jsx("trace", { from: "SW1.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "SW1.pin3", to: "net.BOOTSEL" }), jsxRuntime.jsx("trace", { from: "SW1.pin4", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "U1.GPIO0", to: "net.ROW0" }), jsxRuntime.jsx("trace", { from: "U1.GPIO1", to: "net.ROW1" }), jsxRuntime.jsx("trace", { from: "U1.GPIO2", to: "net.ROW2" }), jsxRuntime.jsx("trace", { from: "U1.GPIO3", to: "net.ROW3" }), jsxRuntime.jsx("trace", { from: "U1.GPIO4", to: "net.COL0" }), jsxRuntime.jsx("trace", { from: "U1.GPIO5", to: "net.COL1" }), jsxRuntime.jsx("trace", { from: "U1.GPIO6", to: "net.COL2" }), jsxRuntime.jsx("trace", { from: "U1.GPIO7", to: "net.COL3" }), jsxRuntime.jsx("trace", { from: "U1.GPIO8", to: "net.COL4" }), jsxRuntime.jsx("trace", { from: "U1.GPIO9", to: "net.SERIAL" }), jsxRuntime.jsx("trace", { from: "J2.pin1", to: "net.SERIAL" }), jsxRuntime.jsx("trace", { from: "J2.pin2", to: "net.V3_3" }), jsxRuntime.jsx("trace", { from: "J2.pin3", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "J2.pin4", to: "net.GND" })] }));

module.exports = index_circuit;