seveibar/rp2040-module

"A USB-C powered RP2040 microcontroller module with integrated 16MB flash memory and crystal oscillator" This summary captures the key physical components (RP2040 microcontroller, USB-C, flash memory, crystal) and the core functionality of the circuit.

Usage: To import and use the RP2040 module in a project: 1. Import the component: ```tsx import { RP2040Module } from "@tsci/seveibar.rp2040-module" ``` 2. Use the component in a circuit design: ```tsx export default () => ( <board width="20mm" height="20mm"> <RP2040Module name="RPModule" /> </board> ) ``` The module includes an RP2040 microcontroller, USB-C connector, voltage regulator, flash memory, crystal oscillator, and supporting components, ready to be integrated into a circuit design.

Version
0.0.1
License
MIT
Stars
2

dist/index.esm.js

PCBPCB preview for dist/index.esm.js
SchematicSchematic preview for dist/index.esm.js
import { createUseComponent, useCapacitor, useResistor } from '@tscircuit/core';

var manualEdits = {
  "pcb_placements": [
    {
      "selector": "J2",
      "center": {
        "x": 1.7691942699231156,
        "y": 3.6268482533423887
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.35973113878066854"
    },
    {
      "selector": "C4",
      "center": {
        "x": 9.385245342672551,
        "y": -7.532894288197705
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.02506254051667911"
    },
    {
      "selector": "K1",
      "center": {
        "x": -8.397324780285967,
        "y": -6.709627152875553
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.3833221277504344"
    },
    {
      "selector": "C1",
      "center": {
        "x": 5.7500882930850565,
        "y": 5.478091893395532
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.8055094738977338"
    },
    {
      "selector": "C9",
      "center": {
        "x": 0.5494170609912867,
        "y": -3.556814901677635
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.05178705560855845"
    },
    {
      "selector": "C11",
      "center": {
        "x": -4.2662133208359485,
        "y": -6.218758790561896
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.5739475299233463"
    },
    {
      "selector": "C12",
      "center": {
        "x": 5.450055788295016,
        "y": -11.014117055065654
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.8762642555295954"
    },
    {
      "selector": "C13",
      "center": {
        "x": -5.937623396545244,
        "y": -11.206533062607027
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.7540971096334508"
    },
    {
      "selector": "C14",
      "center": {
        "x": 0.23337422083980286,
        "y": -15.18460288608022
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.8559921007523581"
    },
    {
      "selector": "C15",
      "center": {
        "x": 5.659651994280232,
        "y": -8.427628538679292
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.16736281554931276"
    },
    {
      "selector": "C16",
      "center": {
        "x": 4.224844820602165,
        "y": -5.616976868652252
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.16673455720058183"
    },
    {
      "selector": "R3",
      "center": {
        "x": 1.162126962429607,
        "y": -4.84896136966041
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.15752947484369195"
    },
    {
      "selector": "R4",
      "center": {
        "x": 3.7793332158607633,
        "y": -4.273430259365842
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.14984405586573835"
    },
    {
      "selector": "C5",
      "center": {
        "x": -1.4935610158233779,
        "y": 1.8181958010548405
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.12752419865485676"
    },
    {
      "selector": "R5",
      "center": {
        "x": -4.920014506168375,
        "y": -4.441726346273164
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.3866627531280977"
    },
    {
      "selector": "C2",
      "center": {
        "x": -2.2294712754583053,
        "y": -16.76238632247091
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.026774173345677"
    },
    {
      "selector": "C3",
      "center": {
        "x": 2.3151442263295587,
        "y": -15.637192681224299
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.6037619404387979"
    },
    {
      "selector": "R1",
      "center": {
        "x": -9.444204328285544,
        "y": 4.20367636481985
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.8818735801999646"
    },
    {
      "selector": "J1",
      "center": {
        "x": -0.03442877804357991,
        "y": 10.25307062195645
      },
      "relative_to": "group_center",
      "_edit_event_id": "0.7762265363955714"
    }
  ],
  "edit_events": [],
  "manual_trace_hints": []
};

function _extends$4() { return _extends$4 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$4.apply(null, arguments); }
const pinLabels$4 = {
  pin1: ["pin1", "CS_N"],
  pin2: ["pin2", "DO", "IO1"],
  pin3: ["pin3", "WP_N", "IO2"],
  pin4: ["pin4", "GND"],
  pin5: ["pin5", "DI", "IO0"],
  pin6: ["pin6", "CLK"],
  pin7: ["pin7", "HOLD_N", "RESET_N", "IO3"],
  pin8: ["pin8", "VCC"]
};
const W25Q16JVSSIQ = props => {
  return /*#__PURE__*/React.createElement("chip", _extends$4({}, props, {
    pinLabels: pinLabels$4,
    supplierPartNumbers: {
      jlcpcb: ["C82317"]
    },
    manufacturerPartNumber: "W25Q16JVSSIQ",
    footprint: "soic8_w9.3_pw0.6_pl2.2",
    schPortArrangement: {
      leftSide: {
        pins: ["CS_N", "CLK", "DI", "DO", "IO2", "IO3"],
        direction: "top-to-bottom"
      },
      topSide: {
        pins: ["VCC"],
        direction: "left-to-right"
      },
      bottomSide: {
        pins: ["GND"],
        direction: "left-to-right"
      }
    }
  }));
};
const useW25Q16JVSSIQ = createUseComponent(W25Q16JVSSIQ, pinLabels$4);

function _extends$3() { return _extends$3 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$3.apply(null, arguments); }
const pinLabels$3 = {
  pin1: ["pin1", "GND"],
  pin2: ["pin2", "VOUT1"],
  pin3: ["pin3", "VIN"],
  pin4: ["pin4", "VOUT2"]
};
const AMS1117_3_3 = props => {
  return /*#__PURE__*/React.createElement("chip", _extends$3({}, props, {
    cadModel: {
      objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=e80246a9471445bfb635be848806a22e&pn=C6186",
      rotationOffset: {
        x: 0,
        y: 0,
        z: 0
      },
      positionOffset: {
        x: 0,
        y: 0,
        z: 0
      }
    },
    pinLabels: pinLabels$3,
    supplierPartNumbers: {
      jlcpcb: ["C6186"]
    },
    schHeight: 1,
    schPinStyle: {
      pin4: {
        bottomMargin: 0.3
      },
      pin3: {
        bottomMargin: 0.3
      }
    },
    schPortArrangement: {
      leftSide: {
        pins: ["VIN"],
        direction: "top-to-bottom"
      },
      rightSide: {
        pins: ["VOUT1", "VOUT2"],
        direction: "top-to-bottom"
      },
      bottomSide: {
        pins: ["GND"],
        direction: "left-to-right"
      }
    },
    manufacturerPartNumber: "AMS1117_3_3",
    footprint: /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin1"],
      pcbX: "2.929959849999932mm",
      pcbY: "-2.2999699999999166mm",
      width: "2.4999949999999997mm",
      height: "1.0999978mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin2"],
      pcbX: "2.929959849999932mm",
      pcbY: "0mm",
      width: "2.4999949999999997mm",
      height: "1.0999978mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin3"],
      pcbX: "2.929959849999932mm",
      pcbY: "2.2999700000000303mm",
      width: "2.4999949999999997mm",
      height: "1.0999978mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin4"],
      pcbX: "-3.009957149999991mm",
      pcbY: "0mm",
      width: "2.3400004mm",
      height: "3.5999928mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        x: -1.6114077499998984,
        y: -3.3262061999998878
      }, {
        x: -1.6114077499998984,
        y: 3.3262062000000014
      }, {
        x: 1.3313854499999707,
        y: 3.3262062000000014
      }, {
        x: 1.3313854499999707,
        y: -3.3262061999998878
      }, {
        x: -1.6114077499998984,
        y: -3.3262061999998878
      }]
    }))
  }));
};
const useAMS1117_3_3 = createUseComponent(AMS1117_3_3, pinLabels$3);

function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
const pinLabels$2 = {
  1: ["GND1", "A1"],
  2: ["GND2", "B12"],
  3: ["VBUS1", "A4"],
  4: ["VBUS2", "B9"],
  5: ["SBU2", "B8"],
  6: ["CC1", "A5"],
  7: ["DM2", "B7"],
  8: ["DP1", "A6"],
  9: ["DM1", "A7"],
  10: ["DP2", "B6"],
  11: ["SBU1", "A8"],
  12: ["CC2", "B5"],
  13: ["VBUS1", "A9"],
  14: ["VBUS2", "B4"],
  15: ["GND1", "A12"],
  16: ["GND2", "B1"]
};
/**
 * USB Type C connector (C165948)
 */
const SmdUsbC = props => {
  return /*#__PURE__*/React.createElement("chip", _extends$2({}, props, {
    cadModel: {
      objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=2a4bc2358b36497d9ab2a66ab6419ba3&pn=C165948",
      rotationOffset: {
        x: 0,
        y: 0,
        z: 180
      },
      positionOffset: {
        x: 0,
        y: -2.5,
        z: 0
      }
    },
    pinLabels: pinLabels$2,
    supplierPartNumbers: {
      jlcpcb: ["C165948"]
    },
    schPortArrangement: {
      leftSide: {
        pins: [],
        direction: "top-to-bottom"
      },
      rightSide: {
        pins: ["VBUS1", "VBUS2", "DP1", "DP2", "DM1", "DM2", "CC1", "CC2", "SBU1", "SBU2"],
        direction: "top-to-bottom"
      },
      bottomSide: {
        pins: ["GND1", "GND2"],
        direction: "left-to-right"
      }
    },
    schPinStyle: {
      pin8: {
        topMargin: 0.4
      },
      pin6: {
        topMargin: 0.4
      },
      pin11: {
        topMargin: 0.2
      },
      pin2: {
        rightMargin: 1
      }
    },
    manufacturerPartNumber: "TYPE-C-31-M-12",
    footprint: /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("hole", {
      pcbX: "-2.8999180000000706mm",
      pcbY: "1.180611049999925mm",
      diameter: "0.7500111999999999mm"
    }), /*#__PURE__*/React.createElement("hole", {
      pcbX: "2.8999180000000706mm",
      pcbY: "1.180611049999925mm",
      diameter: "0.7500111999999999mm"
    }), /*#__PURE__*/React.createElement("platedhole", {
      portHints: ["alt_2"],
      pcbX: "4.32511199999999mm",
      pcbY: "-2.7740863499999477mm",
      outerHeight: "1.7999964mm",
      outerWidth: "1.1999975999999999mm",
      innerHeight: "1.3999972mm",
      innerWidth: "0.7999983999999999mm",
      height: "1.3999972mm",
      shape: "pill"
    }), /*#__PURE__*/React.createElement("platedhole", {
      portHints: ["alt_1"],
      pcbX: "4.32511199999999mm",
      pcbY: "1.4057376499998782mm",
      outerHeight: "1.9999959999999999mm",
      outerWidth: "1.1999975999999999mm",
      innerHeight: "1.5999968mm",
      innerWidth: "0.7999983999999999mm",
      height: "1.5999968mm",
      shape: "pill"
    }), /*#__PURE__*/React.createElement("platedhole", {
      portHints: ["alt_0"],
      pcbX: "-4.32511199999999mm",
      pcbY: "1.4057376499998782mm",
      outerHeight: "1.9999959999999999mm",
      outerWidth: "1.1999975999999999mm",
      innerHeight: "1.5999968mm",
      innerWidth: "0.7999983999999999mm",
      height: "1.5999968mm",
      shape: "pill"
    }), /*#__PURE__*/React.createElement("platedhole", {
      portHints: ["alt_3"],
      pcbX: "-4.32511199999999mm",
      pcbY: "-2.7740863499999477mm",
      outerHeight: "1.7999964mm",
      outerWidth: "1.1999975999999999mm",
      innerHeight: "1.3999972mm",
      innerWidth: "0.7999983999999999mm",
      height: "1.3999972mm",
      shape: "pill"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["B8"],
      pcbX: "-1.7500600000000759mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["A5"],
      pcbX: "-1.2499339999999393mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["B7"],
      pcbX: "-0.7500619999999572mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["A6"],
      pcbX: "-0.2499359999999342mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["A7"],
      pcbX: "0.2499359999999342mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["B6"],
      pcbX: "0.7500619999999572mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["A8"],
      pcbX: "1.2496799999998984mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["B5"],
      pcbX: "1.7500600000000759mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["A1"],
      pcbX: "-3.3500060000000076mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["B12"],
      pcbX: "-3.0500319999999874mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["A4"],
      pcbX: "-2.5499059999999645mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["B9"],
      pcbX: "-2.249932000000058mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["B4"],
      pcbX: "2.249932000000058mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["A9"],
      pcbX: "2.5501600000000053mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["B1"],
      pcbX: "3.050032000000101mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["A12"],
      pcbX: "3.3500060000000076mm",
      pcbY: "2.449087049999889mm",
      width: "0.29999939999999997mm",
      height: "1.2999973999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        x: -4.4689776000000165,
        y: -1.40071475000002
      }, {
        x: -4.4689776000000165,
        y: 0.4621974499998487
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        x: 4.471009600000116,
        y: -5.119096950000085
      }, {
        x: -4.4689776000000165,
        y: -5.119096950000085
      }, {
        x: -4.4689776000000165,
        y: -3.6377943500000356
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        x: 4.471009600000116,
        y: -1.4010703500000545
      }, {
        x: 4.471009600000116,
        y: 0.4625530499999968
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        x: 4.471009600000116,
        y: -5.119096950000085
      }, {
        x: 4.471009600000116,
        y: -3.6374387500002285
      }]
    }))
  }));
};
const useUsbC = createUseComponent(SmdUsbC, pinLabels$2);

function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
const pinLabels$1 = {
  pin1: ["IOVDD1"],
  pin2: ["GPIO0"],
  pin3: ["GPIO1"],
  pin4: ["GPIO2"],
  pin5: ["GPIO3"],
  pin6: ["GPIO4"],
  pin7: ["GPIO5"],
  pin8: ["GPIO6"],
  pin9: ["GPIO7"],
  pin10: ["IOVDD2"],
  pin11: ["GPIO8"],
  pin12: ["GPIO9"],
  pin13: ["GPIO10"],
  pin14: ["GPIO11"],
  pin15: ["GPIO12"],
  pin16: ["GPIO13"],
  pin17: ["GPIO14"],
  pin18: ["GPIO15"],
  pin19: ["TESTEN"],
  pin20: ["XIN"],
  pin21: ["XOUT"],
  pin22: ["IOVDD3"],
  pin23: ["DVDD1"],
  pin24: ["SWCLK"],
  pin25: ["SWD"],
  pin26: ["RUN"],
  pin27: ["GPIO16"],
  pin28: ["GPIO17"],
  pin29: ["GPIO18"],
  pin30: ["GPIO19"],
  pin31: ["GPIO20"],
  pin32: ["GPIO21"],
  pin33: ["IOVDD4"],
  pin34: ["GPIO22"],
  pin35: ["GPIO23"],
  pin36: ["GPIO24"],
  pin37: ["GPIO25"],
  pin38: ["GPIO26_ADC0", "GPIO26", "ADC0"],
  pin39: ["GPIO27_ADC1", "GPIO27", "ADC1"],
  pin40: ["GPIO28_ADC2", "GPIO28", "ADC2"],
  pin41: ["GPIO29_ADC3", "GPIO29", "ADC3"],
  pin42: ["IOVDD5"],
  pin43: ["ADC_IOVDD"],
  pin44: ["VREG_IOVDD"],
  pin45: ["VREG_VOUT"],
  pin46: ["USB_DM"],
  pin47: ["USB_DP"],
  pin48: ["USB_IOVDD"],
  pin49: ["IOVDD6"],
  pin50: ["DVDD2"],
  pin51: ["QSPI_SD3"],
  pin52: ["QSPI_SCLK"],
  pin53: ["QSPI_SD0"],
  pin54: ["QSPI_SD2"],
  pin55: ["QSPI_SD1"],
  pin56: ["QSPI_SS_N"],
  pin57: ["GND", "thermalpad"]
};
const RP2040 = props => /*#__PURE__*/React.createElement("chip", _extends$1({}, props, {
  pinLabels: pinLabels$1,
  manufacturerPartNumber: "RP2040",
  schPortArrangement: {
    leftSide: {
      pins: ["QSPI_SS_N", "QSPI_SD0", "QSPI_SD1", "QSPI_SD2", "QSPI_SD3", "QSPI_SCLK", "XIN", "XOUT", "RUN", "SWCLK", "SWD"],
      direction: "top-to-bottom"
    },
    rightSide: {
      pins: ["USB_DP", "USB_DM", "GPIO0", "GPIO1", "GPIO2", "GPIO3", "GPIO4", "GPIO5", "GPIO6", "GPIO7", "GPIO8", "GPIO9", "GPIO10", "GPIO11", "GPIO12", "GPIO13", "GPIO14", "GPIO15", "GPIO16", "GPIO17", "GPIO18", "GPIO19", "GPIO20", "GPIO21", "GPIO22", "GPIO23", "GPIO24", "GPIO25", "GPIO26_ADC0", "GPIO27_ADC1", "GPIO28_ADC2", "GPIO29_ADC3"],
      direction: "top-to-bottom"
    },
    topSide: {
      pins: ["DVDD1", "DVDD2", "VREG_VOUT", "VREG_IOVDD", "IOVDD1", "IOVDD2", "IOVDD3", "IOVDD4", "IOVDD5", "IOVDD6", "USB_IOVDD", "ADC_IOVDD"],
      direction: "left-to-right"
    },
    bottomSide: {
      pins: ["TESTEN", "GND"],
      direction: "left-to-right"
    }
  },
  schPinStyle: {
    pin38: {
      topMargin: 0.5
    },
    pin57: {
      leftMargin: 0.5
    },
    pin20: {
      topMargin: 1
    },
    pin26: {
      topMargin: 0.2
    },
    pin24: {
      topMargin: 0.2
    },
    pin45: {
      leftMargin: 0.2
    },
    pin49: {
      leftMargin: 0.2
    },
    pin48: {
      leftMargin: 0.2
    },
    pin43: {
      leftMargin: 0.2,
      rightMargin: 1
    },
    pin2: {
      topMargin: 0.2
    },
    pin47: {
      topMargin: 0.2
    }
  },
  footprint: "qfn56_pw0.2_p0.4_pl0.875_w7.75_h7.75_thermalpad3.2mmx3.2mm"
}));
const useRP2040 = createUseComponent(RP2040, pinLabels$1);

function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
const pinLabels = {
  "pin1": ["pin1"],
  "pin2": ["pin2", "GND1"],
  "pin3": ["pin3"],
  "pin4": ["pin4", "GND2"]
};
const ABM8_272_T3 = props => {
  return /*#__PURE__*/React.createElement("chip", _extends({}, props, {
    cadModel: {
      objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=1840cb1b89674ca18acb69eedbab271b&pn=C20625731",
      rotationOffset: {
        x: 0,
        y: 0,
        z: 0
      },
      positionOffset: {
        x: 0,
        y: 0,
        z: 0
      }
    },
    pinLabels: pinLabels,
    supplierPartNumbers: {
      "jlcpcb": ["C20625731"]
    },
    manufacturerPartNumber: "ABM8_272_T3",
    footprint: /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin1"],
      pcbX: "-1.1000739999999496mm",
      pcbY: "-0.850010999999995mm",
      width: "1.3999972mm",
      height: "1.1999975999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin2"],
      pcbX: "1.1000739999999496mm",
      pcbY: "-0.850010999999995mm",
      width: "1.3999972mm",
      height: "1.1999975999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin3"],
      pcbX: "1.1000739999999496mm",
      pcbY: "0.850010999999995mm",
      width: "1.3999972mm",
      height: "1.1999975999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin4"],
      pcbX: "-1.1000739999999496mm",
      pcbY: "0.850010999999995mm",
      width: "1.3999972mm",
      height: "1.1999975999999999mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -2.028596400000083,
        "y": -1.6784827999999834
      }, {
        "x": -2.028596400000083,
        "y": 1.678736800000138
      }, {
        "x": 2.0285963999999694,
        "y": 1.678736800000138
      }, {
        "x": 2.0285963999999694,
        "y": -1.6784827999999834
      }, {
        "x": -2.028596400000083,
        "y": -1.6784827999999834
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -2.257196399999998,
        "y": -0.24988519999988057
      }, {
        "x": -2.257196399999998,
        "y": -1.9070827999998983
      }, {
        "x": -0.39999920000002476,
        "y": -1.9070827999998983
      }]
    }))
  }));
};
const useABM8_272_T3 = createUseComponent(ABM8_272_T3, pinLabels);

/**
 *
 * Based on: https://datasheets.raspberrypi.com/rp2040/hardware-design-with-rp2040.pdf
 */
const RP2040Module = props => {
  const RP2040 = useRP2040("U3");
  const UsbC = useUsbC("J1");
  const Reg = useAMS1117_3_3("U1");
  const C1 = useCapacitor("C1", {
    capacitance: "10uF",
    footprint: "0603"
  });
  const C2 = useCapacitor("C2", {
    capacitance: "15pF",
    footprint: "0402"
  });
  const C3 = useCapacitor("C3", {
    capacitance: "15pF",
    footprint: "0402"
  });
  const C4 = useCapacitor("C4", {
    capacitance: "10uF",
    footprint: "0603"
  });
  const C5 = useCapacitor("C5", {
    capacitance: "100nF",
    footprint: "0402"
  });
  const C9 = useCapacitor("C9", {
    capacitance: "100nF",
    footprint: "0402"
  });
  const C11 = useCapacitor("C11", {
    capacitance: "100nF",
    footprint: "0402"
  });
  const C12 = useCapacitor("C12", {
    capacitance: "100nF",
    footprint: "0402"
  });
  const C13 = useCapacitor("C13", {
    capacitance: "100nF",
    footprint: "0402"
  });
  const C14 = useCapacitor("C14", {
    capacitance: "100nF",
    footprint: "0402"
  });
  const C15 = useCapacitor("C15", {
    capacitance: "100nF",
    footprint: "0402"
  });
  const C16 = useCapacitor("C16", {
    capacitance: "100nF",
    footprint: "0402"
  });
  const R3 = useResistor("R3", {
    resistance: 27.4,
    footprint: "0402"
  });
  const R4 = useResistor("R4", {
    resistance: 27.4,
    footprint: "0402"
  });
  const R5 = useResistor("R5", {
    resistance: "1k",
    footprint: "0402"
  });
  const Flash = useW25Q16JVSSIQ("U2");
  const Crystal = useABM8_272_T3("K1");
  return /*#__PURE__*/React.createElement("group", {
    subcircuit: true,
    autorouter: "auto-cloud",
    manualEdits: manualEdits
  }, /*#__PURE__*/React.createElement(RP2040, {
    pcbY: -10,
    XOUT: "net.XOUT",
    XIN: "net.XIN"
  }), /*#__PURE__*/React.createElement(UsbC, {
    schX: -18,
    pcbY: 10,
    pcbRotation: "180deg",
    DP1: "net.USBDP",
    DP2: ".J1 .DP1",
    DM1: "net.USBDM",
    DM2: ".J1 .DM1"
  }), /*#__PURE__*/React.createElement(Reg, {
    schX: -10,
    pcbX: 10,
    pcbY: 1,
    pcbRotation: "90deg"
  }), /*#__PURE__*/React.createElement(C1, {
    neg: "net.GND",
    pos: Reg.VIN,
    schX: -11.5,
    schY: -1,
    pcbRotation: "90deg",
    schRotation: "90deg"
  }), /*#__PURE__*/React.createElement(C4, {
    neg: "net.GND",
    pos: Reg.VOUT1,
    pcbRotation: "180deg",
    schX: -8,
    schY: -1,
    schRotation: "90deg"
  }), /*#__PURE__*/React.createElement(C9, {
    schX: 4,
    schY: 6,
    schRotation: "90deg",
    neg: "net.GND",
    pos: RP2040.IOVDD6
  }), /*#__PURE__*/React.createElement("trace", {
    from: RP2040.USB_IOVDD,
    to: RP2040.IOVDD6
  }), /*#__PURE__*/React.createElement(C11, {
    schX: 6,
    schY: 6,
    schRotation: "90deg",
    neg: "net.GND",
    pos: RP2040.IOVDD1
  }), /*#__PURE__*/React.createElement(C12, {
    schX: 8,
    schY: 6,
    schRotation: "90deg",
    neg: "net.GND",
    pos: RP2040.IOVDD4
  }), /*#__PURE__*/React.createElement(C13, {
    schX: 10,
    schY: 6,
    schRotation: "90deg",
    neg: "net.GND",
    pos: RP2040.IOVDD2
  }), /*#__PURE__*/React.createElement(C14, {
    schX: 12,
    schY: 6,
    schRotation: "90deg",
    neg: "net.GND",
    pos: RP2040.IOVDD3
  }), /*#__PURE__*/React.createElement(C15, {
    schX: 14,
    schY: 6,
    schRotation: "90deg",
    neg: "net.GND",
    pos: RP2040.IOVDD5
  }), /*#__PURE__*/React.createElement(C16, {
    schX: 16,
    schY: 6,
    schRotation: "90deg",
    neg: "net.GND",
    pos: RP2040.ADC_IOVDD
  }), /*#__PURE__*/React.createElement(R3, {
    left: RP2040.USB_DP,
    right: "net.USBDP",
    schX: 4,
    schY: 3.5
  }), /*#__PURE__*/React.createElement(R4, {
    left: RP2040.USB_DM,
    right: "net.USBDM",
    schX: 4,
    schY: 2.5
  }), /*#__PURE__*/React.createElement(Flash, {
    schX: -6,
    schY: -6,
    pcbX: -8,
    CS_N: RP2040.QSPI_SS_N,
    CLK: RP2040.QSPI_SCLK,
    IO0: RP2040.QSPI_SD0,
    IO1: RP2040.QSPI_SD1,
    IO2: RP2040.QSPI_SD2,
    IO3: RP2040.QSPI_SD3,
    VCC: "net.V3_3",
    GND: "net.GND"
  }), /*#__PURE__*/React.createElement(C5, {
    pos: Flash.VCC,
    neg: "net.GND",
    schRotation: "90deg",
    schX: -3,
    schY: -5
  }), /*#__PURE__*/React.createElement("pinheader", {
    name: "J2",
    footprint: "pinrow2",
    schX: -12,
    schY: -6,
    facingDirection: "right",
    pinCount: 2
  }), /*#__PURE__*/React.createElement(Crystal, {
    schX: -12,
    schY: 8,
    pin1: "net.XIN",
    pin3: ".R5 .pin1",
    GND1: "net.GND",
    GND2: "net.GND"
  }), /*#__PURE__*/React.createElement(R5, {
    pin2: "net.XOUT",
    schX: -9,
    schY: 7.8
  }), /*#__PURE__*/React.createElement(C2, {
    schX: -14.5,
    schY: 7,
    schRotation: "90deg",
    decouplingFor: "net.XIN",
    decouplingTo: "net.GND"
  }), /*#__PURE__*/React.createElement(C3, {
    schX: -16,
    schY: 7,
    schRotation: "90deg",
    decouplingFor: "net.XOUT",
    decouplingTo: "net.GND"
  }), /*#__PURE__*/React.createElement("resistor", {
    name: "R1",
    resistance: "1k",
    schX: -10,
    schY: -5.5,
    footprint: "0402"
  }), /*#__PURE__*/React.createElement("trace", {
    from: ".J2 .pin1",
    to: "net.GND"
  }), /*#__PURE__*/React.createElement("trace", {
    from: ".R1 > .left",
    to: ".J2 .pin2"
  }), /*#__PURE__*/React.createElement("trace", {
    from: ".U2 .CS_N",
    to: ".R1 .pin2"
  }), /*#__PURE__*/React.createElement("trace", {
    from: UsbC.GND1,
    to: "net.GND"
  }), /*#__PURE__*/React.createElement("trace", {
    from: RP2040.GND,
    to: "net.GND"
  }), /*#__PURE__*/React.createElement("trace", {
    from: Reg.GND,
    to: "net.GND"
  }), /*#__PURE__*/React.createElement("trace", {
    from: Flash.GND,
    to: "net.GND"
  }), /*#__PURE__*/React.createElement("trace", {
    from: Reg.VIN,
    to: UsbC.VBUS1
  }), /*#__PURE__*/React.createElement("trace", {
    from: Reg.VOUT1,
    to: "net.V3_3"
  }), /*#__PURE__*/React.createElement("trace", {
    from: Reg.VOUT2,
    to: "net.V3_3"
  }));
};

export { RP2040Module };