gokul/usb3-sd-hub
Engineering draft: four-layer, computer-powered USB 3 hub with one USB-C host socket, two USB-C and two USB-A accessory sockets, and a full-size SD slot. Board and three schematic previews are available. Routing and production checks are incomplete; not fabrication ready.
- Version
- 0.1.4
- License
- unset
- Stars
- 0
components/EsdBank.tsx
import { placementFor } from "../design/placement";
import { TPD1E05U06DPYR } from "../imports/TPD1E05U06DPYR";
export const EsdBank = ({
prefix,
signals,
pcbX,
pcbY,
vertical = false,
}: {
prefix: string;
signals: string[];
pcbX: number;
pcbY: number;
vertical?: boolean;
}) => (
<group
pcbAnchorAlignment="center"
pcbX="0mm"
pcbY="0mm"
pcbLayout={{ layoutMode: "none" }}
name={`${prefix}_esd`}
schGrid
gridCols={4}
gridGap={2}
>
{signals.map((signal, index) => (
<TPD1E05U06DPYR
key={signal}
name={`D_${prefix}_${index + 1}`}
pcbX={
pcbX + (vertical ? Math.floor(index / 4) * 1.8 : (index % 4) * 1.8)
}
pcbY={
pcbY - (vertical ? (index % 4) * 1.3 : Math.floor(index / 4) * 1.3)
}
{...placementFor(`D_${prefix}_${index + 1}`)}
connections={{ I: `net.${signal}`, GND: "net.GND" }}
pcbStyle={{ silkscreenTextVisibility: "hidden" }}
/>
))}
</group>
);