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/place.ts

import placement from "./placement.json"

/** Board placement from scripts/place.py (lib/placement.json). A part missing from the table falls back to the
 * coordinates given in its block, so new parts still build before they are placed. */
type P = { x: number; y: number; rot?: number }
const PL = placement as Record<string, P>
export const placed = (name: string) => PL[name]
export const pcb = (name: string, fb: { x?: number; y?: number; rot?: number } = {}) => {
  const p = PL[name] ?? fb
  return { pcbX: p.x ?? 0, pcbY: p.y ?? 0, pcbRotation: p.rot ?? 0 }
}