pixalynx/usb3-hub-10g

A USB 3.2 Gen 2 six-port hub board with USB-C PD power input, regulated 5 V/3.3 V/1.15 V rails, one upstream and four protected downstream USB-A/USB-C ports, SuperSpeed muxes, ESD protection, and controlled port power.

Version
0.0.1
License
unset
Stars
0

lib/sch-labels.tsx

import { Fragment } from "react"
import labels from "./sch-labels.json"

/** Schematic net labels on every pin of a named net, generated by scripts/sch-labels.py from a placement pre-pass.
 * A label on one pin sits on the pin's outer end; a label shared by a run of adjacent pins sits a little further
 * out and tscircuit draws the comb of wires to it. Each label names the sheet of its part (labels sit at board level,
 * outside the sheets). Connectivity is unchanged: each label restates existing nets. */
type Label = { ports: string[]; net: string; x: number; y: number; side: "left" | "right" | "top" | "bottom"; sheet: string }

export const SchLabels = () => (
  <>
    {(labels as Label[]).map((l) => (
      <Fragment key={l.ports[0]}>
        <netlabel net={l.net} connectsTo={l.ports.length === 1 ? l.ports[0] : l.ports} schX={l.x} schY={l.y} anchorSide={l.side}
          {...({ schSheetName: l.sheet } as {})} />
      </Fragment>
    ))}
  </>
)