rushabhcodes/ESP32-E-Reader

Battery-powered ESP32-C3 e-reader board with USB-C LiPo charging/protection, buck-boost 3.3 V supply, Wi‑Fi MCU, e-paper and microSD interfaces, display charge-pump rails, and tactile power/navigation controls.

Version
1.0.87
License
unset
Stars
3

imports/USBLC6_2SC6.tsx

import localC7519obj from "../assets/components/C7519.obj";
import type { ChipProps } from "@tscircuit/props";

const pinLabels = {
	pin1: ["pin1"],
	pin2: ["pin2"],
	pin3: ["pin3"],
	pin4: ["pin4"],
	pin5: ["pin5"],
	pin6: ["pin6"],
} as const;

export const USBLC6_2SC6 = (props: ChipProps<typeof pinLabels>) => {
	return (
		<chip
			pinLabels={pinLabels}
			// USBLC6-2SC6: pin 5 is the VBUS clamp reference, pin 2 is ground.
			pinAttributes={{
				pin5: { requiresPower: true },
				pin2: { requiresGround: true },
			}}
			symbol={
				<symbol>
					<schematictext text="{REF}" schX={0} schY={0.8} fontSize={0.18} />
					<schematicrect
						schX={0}
						schY={0}
						width={1.8}
						height={2}
						color="#880000"
						strokeWidth={0.04}
						isFilled={false}
					/>
					<port
						name="pin1"
						pinNumber={1}
						aliases={["1"]}
						direction="left"
						schX={-1.3}
						schY={0.6}
						schStemLength={0.4}
					/>
					<port
						name="pin2"
						pinNumber={2}
						aliases={["2"]}
						direction="left"
						schX={-1.3}
						schY={0}
						schStemLength={0.4}
					/>
					<port
						name="pin3"
						pinNumber={3}
						aliases={["3"]}
						direction="left"
						schX={-1.3}
						schY={-0.6}
						schStemLength={0.4}
					/>
					<port
						name="pin4"
						pinNumber={4}
						aliases={["4"]}
						direction="right"
						schX={1.3}
						schY={-0.6}
						schStemLength={0.4}
					/>
					<port
						name="pin5"
						pinNumber={5}
						aliases={["5"]}
						direction="right"
						schX={1.3}
						schY={0}
						schStemLength={0.4}
					/>
					<port
						name="pin6"
						pinNumber={6}
						aliases={["6"]}
						direction="right"
						schX={1.3}
						schY={0.6}
						schStemLength={0.4}
					/>
					<schematicpath
						points={[
							{ x: -0.9, y: 0.6 },
							{ x: 0.9, y: 0.6 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: -0.9, y: -0.6 },
							{ x: 0.9, y: -0.6 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: -0.9, y: 0 },
							{ x: 0.9, y: 0 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						svgPath="M -0.14 -0.12 L 0.06 0 L -0.14 0.14 Z"
						strokeColor="#880000"
						isFilled
						fillColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: 0.1, y: 0.16 },
							{ x: 0.06, y: 0.16 },
							{ x: 0.06, y: -0.14 },
							{ x: 0, y: -0.14 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: -0.68, y: 0 },
							{ x: -0.68, y: 0.4 },
							{ x: 0.66, y: 0.4 },
							{ x: 0.66, y: -0.4 },
							{ x: -0.68, y: -0.4 },
							{ x: -0.68, y: 0 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: 0, y: 0.6 },
							{ x: 0, y: 0.4 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: 0, y: -0.6 },
							{ x: 0, y: -0.4 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						svgPath="M -0.46 0.28 L -0.26 0.4 L -0.46 0.54 Z"
						strokeColor="#880000"
						isFilled
						fillColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: -0.26, y: 0.56 },
							{ x: -0.26, y: 0.56 },
							{ x: -0.26, y: 0.26 },
							{ x: -0.26, y: 0.26 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						svgPath="M 0.22 0.28 L 0.42 0.4 L 0.22 0.54 Z"
						strokeColor="#880000"
						isFilled
						fillColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: 0.42, y: 0.56 },
							{ x: 0.42, y: 0.56 },
							{ x: 0.42, y: 0.26 },
							{ x: 0.42, y: 0.26 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						svgPath="M -0.48 -0.52 L -0.28 -0.4 L -0.48 -0.26 Z"
						strokeColor="#880000"
						isFilled
						fillColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: -0.28, y: -0.24 },
							{ x: -0.28, y: -0.24 },
							{ x: -0.28, y: -0.54 },
							{ x: -0.28, y: -0.54 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						svgPath="M 0.22 -0.52 L 0.42 -0.4 L 0.22 -0.26 Z"
						strokeColor="#880000"
						isFilled
						fillColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: 0.42, y: -0.24 },
							{ x: 0.42, y: -0.24 },
							{ x: 0.42, y: -0.54 },
							{ x: 0.42, y: -0.54 },
						]}
						strokeColor="#880000"
					/>
					<schematiccircle
						center={{ x: 0, y: 0.6 }}
						radius={0.02}
						color="#880000"
					/>
					<schematiccircle
						center={{ x: 0, y: 0.4 }}
						radius={0.02}
						color="#880000"
					/>
					<schematiccircle
						center={{ x: -0.68, y: 0 }}
						radius={0.02}
						color="#880000"
					/>
					<schematiccircle
						center={{ x: 0.66, y: 0 }}
						radius={0.02}
						color="#880000"
					/>
					<schematiccircle
						center={{ x: 0, y: -0.4 }}
						radius={0.02}
						color="#880000"
					/>
					<schematiccircle
						center={{ x: 0, y: -0.6 }}
						radius={0.02}
						color="#880000"
					/>
				</symbol>
			}
			supplierPartNumbers={{
				jlcpcb: ["C7519"],
			}}
			manufacturerPartNumber="USBLC6-2SC6"
			footprint={
				<footprint>
					<smtpad
						portHints={["pin1"]}
						pcbX="-0.94996mm"
						pcbY="-1.149096mm"
						width="0.532003mm"
						height="1.072007mm"
						shape="rect"
					/>
					<smtpad
						portHints={["pin2"]}
						pcbX="0mm"
						pcbY="-1.149096mm"
						width="0.532003mm"
						height="1.072007mm"
						shape="rect"
					/>
					<smtpad
						portHints={["pin3"]}
						pcbX="0.94996mm"
						pcbY="-1.149096mm"
						width="0.532003mm"
						height="1.072007mm"
						shape="rect"
					/>
					<smtpad
						portHints={["pin4"]}
						pcbX="0.94996mm"
						pcbY="1.149096mm"
						width="0.532003mm"
						height="1.072007mm"
						shape="rect"
					/>
					<smtpad
						portHints={["pin5"]}
						pcbX="0mm"
						pcbY="1.149096mm"
						width="0.532003mm"
						height="1.072007mm"
						shape="rect"
					/>
					<smtpad
						portHints={["pin6"]}
						pcbX="-0.94996mm"
						pcbY="1.149096mm"
						width="0.532003mm"
						height="1.072007mm"
						shape="rect"
					/>
					<silkscreenpath
						route={[
							{ x: 1.5391891999998961, y: -0.8892031999998835 },
							{ x: 1.5391891999998961, y: 0.8892031999999972 },
						]}
					/>
					<silkscreenpath
						route={[
							{ x: -1.5391892000000098, y: -0.8892031999998835 },
							{ x: -1.5391892000000098, y: 0.8892031999999972 },
						]}
					/>
					<silkscreencircle
						pcbX="-1.668272mm"
						pcbY="-1.301496mm"
						radius="0.150114mm"
					/>
					<silkscreentext
						text="{NAME}"
						pcbX="-0.1524mm"
						pcbY="2.6764mm"
						anchorAlignment="center"
						fontSize="1mm"
					/>
					<courtyardoutline
						outline={[
							{ x: -2.078800000000001, y: 1.9264000000000578 },
							{ x: 1.7739999999998872, y: 1.9264000000000578 },
							{ x: 1.7739999999998872, y: -2.0279999999999063 },
							{ x: -2.078800000000001, y: -2.0279999999999063 },
							{ x: -2.078800000000001, y: 1.9264000000000578 },
						]}
					/>
				</footprint>
			}
			cadModel={{
				objUrl: localC7519obj,
				pcbRotationOffset: 90,
				modelOriginPosition: {
					x: -0.000012700000070253736,
					y: 0.000012700000070253736,
					z: -0.048939,
				},
			}}
			{...props}
		/>
	);
};