tscircuit/ti

ti tscircuit library

Version
1.0.197
License
unset
Stars
0

system-block-ui/src/model/subcircuit-adapters.ts

import type {
  PortDefinition,
  PortSignal,
  SignalDirection,
  SubcircuitDefinition,
  VoltageRequirement,
} from "./types";

const TI_PACKAGE = "@tsci/tscircuit.ti";
const SOURCE_ROOT = "lib/subcircuits";
const THIRD_PARTY_SOURCE_ROOT = "lib/thirdparty-subcircuits";

const signal = (
  name: string,
  direction: SignalDirection,
  selectors: readonly string[],
  required = true,
): PortSignal => ({ name, direction, selectors, required });

const powerPort = ({
  id,
  label,
  role,
  voltage,
  positive,
  ground,
  allowMultiple,
  protocol = "power",
}: {
  id: string;
  label: string;
  role: "provider" | "consumer";
  voltage: VoltageRequirement;
  positive: readonly string[];
  ground: readonly string[];
  allowMultiple?: boolean;
  protocol?: PortDefinition["protocol"];
}): PortDefinition => ({
  id,
  label,
  kind: "power",
  role,
  protocol,
  voltage,
  allowMultiple,
  requiredSignals: ["positive", "ground"],
  signals: [
    signal("positive", role === "provider" ? "output" : "input", positive),
    signal("ground", "passive", ground),
  ],
});

const adapter = (
  definition: Omit<SubcircuitDefinition, "importPath" | "sourcePath"> & {
    sourceFile: string;
    sourceRoot?: string;
  },
): SubcircuitDefinition => {
  const { sourceFile, sourceRoot = SOURCE_ROOT, ...rest } = definition;
  return {
    ...rest,
    importPath: TI_PACKAGE,
    sourcePath: `${sourceRoot}/${sourceFile}`,
    canInstantiate: definition.canInstantiate ?? true,
  };
};

const mspm0g51x7Adapter = ({
  id,
  partNumber,
  componentName,
  sourceFile,
  edgeAi = false,
}: {
  id: string;
  partNumber: string;
  componentName: string;
  sourceFile: string;
  edgeAi?: boolean;
}): SubcircuitDefinition =>
  adapter({
    id,
    title: `${partNumber} Microcontroller`,
    description: `USB-capable 80 MHz MSPM0 MCU with TI-recommended power, reset, VCORE, VUSB33, ROSC, I2C, and SWD support${edgeAi ? " plus a TinyEngine NPU" : ""}.`,
    category: "Processors",
    componentName,
    sourceFile,
    tags: [
      "mcu",
      "mspm0",
      "usb",
      "i2c",
      "swd",
      ...(edgeAi ? ["edge-ai", "npu"] : []),
    ],
    ports: [
      powerPort({
        id: "power-in",
        label: "3.3 V MCU and USB Power",
        role: "consumer",
        voltage: { min: 3, max: 3.6, nominal: 3.3 },
        positive: [".VDD"],
        ground: [".GND"],
        protocol: "logic-3v3",
      }),
      {
        id: "i2c",
        label: "I2C",
        kind: "data",
        role: "host",
        protocol: "i2c",
        requiredSignals: ["scl", "sda"],
        allowMultiple: true,
        signals: [
          signal("scl", "output", [".I2C0_SCL"]),
          signal("sda", "bidirectional", [".I2C0_SDA"]),
        ],
      },
      {
        id: "usb-device",
        label: "USB Device",
        kind: "data",
        role: "device",
        protocol: "usb",
        requiredSignals: ["positive", "negative", "ground"],
        signals: [
          signal("positive", "bidirectional", [".USB_DP"]),
          signal("negative", "bidirectional", [".USB_DM"]),
          signal("ground", "passive", [".GND"]),
        ],
      },
      {
        id: "swd",
        label: "Serial Wire Debug",
        kind: "data",
        role: "device",
        protocol: "swd",
        requiredSignals: ["swdio", "swclk"],
        signals: [
          signal("swdio", "bidirectional", [".SWDIO"]),
          signal("swclk", "input", [".SWCLK"]),
          signal("reset", "input", [".NRST"], false),
          signal("ground", "passive", [".GND"], false),
        ],
      },
    ],
  });

/**
 * Hand-authored electrical metadata for subcircuits whose interfaces are known.
 * All other repository subcircuits are still discovered by catalog.ts, but have
 * no automatic ports until an adapter is added here.
 */
export const CURATED_SUBCIRCUIT_ADAPTERS: readonly SubcircuitDefinition[] = [
  adapter({
    id: "battery-management-bq24074",
    title: "BQ24074 Battery Management",
    description: "Single-cell charger and power-path system rail.",
    category: "Power",
    componentName: "BatteryManagement_BQ24074",
    sourceFile: "BatteryManagement_BQ24074.circuit.tsx",
    tags: ["battery", "charger", "power-path"],
    ports: [
      powerPort({
        id: "system-power-out",
        label: "System Power",
        role: "provider",
        voltage: { min: 3, max: 4.4, nominal: 3.7 },
        positive: [".U1 > .OUT"],
        ground: [".U1 > .VSS"],
        allowMultiple: true,
      }),
    ],
  }),
  adapter({
    id: "battery-management-2to4-cell-bq40z60",
    title: "BQ40Z60 2-to-4-Cell Battery Management",
    description:
      "Multi-cell battery manager with a protected pack rail and SMBus monitoring.",
    category: "Power",
    componentName: "BatteryManagement_2to4Cell_BQ40Z60",
    sourceFile: "BatteryManagement_2to4Cell_BQ40Z60.circuit.tsx",
    tags: ["battery", "battery-management", "fuel-gauge", "i2c", "smbus"],
    ports: [
      powerPort({
        id: "battery-pack-out",
        label: "Battery Pack",
        role: "provider",
        voltage: { min: 6, max: 17.6, nominal: 14.8 },
        positive: [".C2 > .pin2"],
        ground: [".C3 > .pin2"],
      }),
      {
        id: "smbus",
        label: "Battery SMBus",
        kind: "data",
        role: "device",
        protocol: "i2c",
        requiredSignals: ["scl", "sda"],
        signals: [
          signal("scl", "input", [".U2 > .pin17"]),
          signal("sda", "bidirectional", [".U2 > .pin16"]),
        ],
      },
    ],
  }),
  adapter({
    id: "battery-charging-2to5-cell-bq25731",
    title: "BQ25731 2-to-5-Cell Buck-Boost Charger",
    description:
      "NVDC battery charger with a shared power-bank system rail and I2C control.",
    category: "Power",
    componentName: "BatteryCharging_2to5CellNVDCBuckBoost_BQ25731",
    sourceFile: "BatteryCharging_2to5CellNVDCBuckBoost_BQ25731.circuit.tsx",
    tags: ["battery", "charger", "buck-boost", "i2c", "power-path"],
    ports: [
      powerPort({
        id: "battery-pack-in",
        label: "Battery Pack",
        role: "consumer",
        voltage: { min: 1.024, max: 23, nominal: 14.8 },
        positive: [".C31 > .pin1"],
        ground: [".U1 > .pin27"],
      }),
      powerPort({
        id: "system-power-out",
        label: "Power-Bank System Rail",
        role: "provider",
        voltage: { min: 3, max: 4.4, nominal: 3.7 },
        positive: [".C31 > .pin2"],
        ground: [".U1 > .pin27"],
        allowMultiple: true,
      }),
      {
        id: "i2c",
        label: "Charger I2C",
        kind: "data",
        role: "device",
        protocol: "i2c",
        requiredSignals: ["scl", "sda"],
        signals: [
          signal("scl", "input", [".U1 > .pin13"]),
          signal("sda", "bidirectional", [".U1 > .pin12"]),
        ],
      },
    ],
  }),
  adapter({
    id: "boost-converter-tps61236",
    title: "TPS61236 3 V Boost Converter",
    description:
      "Power-bank system regulator with MCU-controlled VCUR and VCOM switches.",
    category: "Power",
    componentName: "BoostConverter_TPS61236",
    sourceFile: "BoostConverter_TPS61236.circuit.tsx",
    tags: ["boost", "3v", "power-bank", "gpio"],
    ports: [
      powerPort({
        id: "power-in",
        label: "Power Input",
        role: "consumer",
        voltage: { min: 2.3, max: 5.5, nominal: 3.7 },
        positive: [".J1 > .pin1"],
        ground: [".C2 > .pin2"],
      }),
      powerPort({
        id: "power-3v-out",
        label: "3 V System Power",
        role: "provider",
        voltage: 3,
        positive: [".C2 > .pin1"],
        ground: [".C2 > .pin2"],
        allowMultiple: true,
      }),
      {
        id: "power-control",
        label: "Power Control",
        kind: "data",
        role: "peripheral",
        protocol: "gpio",
        requiredSignals: ["vcur", "vcom"],
        signals: [
          signal("vcur", "input", [".Q2 > .gate"]),
          signal("vcom", "input", [".Q1 > .gate"]),
        ],
      },
    ],
  }),
  adapter({
    id: "microcontroller-msp430g2332",
    title: "MSP430G2332 Power-Bank Microcontroller",
    description:
      "Power-bank host controller with shared I2C and regulator control GPIOs.",
    category: "Processors",
    componentName: "Microcontroller_MSP430G2332",
    sourceFile: "Microcontroller_MSP430G2332.circuit.tsx",
    tags: ["msp430", "mcu", "i2c", "gpio", "power-bank"],
    ports: [
      powerPort({
        id: "power-in",
        label: "MCU Power",
        role: "consumer",
        voltage: { min: 2.2, max: 5.5, nominal: 3 },
        positive: [".U2 > .pin6"],
        ground: [".U4 > .pin20"],
      }),
      {
        id: "i2c",
        label: "Power Management I2C",
        kind: "data",
        role: "host",
        protocol: "i2c",
        requiredSignals: ["scl", "sda"],
        allowMultiple: true,
        signals: [
          signal("scl", "output", [".U4 > .pin14"]),
          signal("sda", "bidirectional", [".U4 > .pin15"]),
        ],
      },
      {
        id: "power-control",
        label: "Boost Converter Control",
        kind: "data",
        role: "controller",
        protocol: "gpio",
        requiredSignals: ["vcur", "vcom"],
        signals: [
          signal("vcur", "output", [".U4 > .pin12"]),
          signal("vcom", "output", [".U4 > .pin13"]),
        ],
      },
    ],
  }),
  adapter({
    id: "usb-c-power-delivery-tps61288",
    title: "TPS61288 USB-C Programmable Power Supply",
    description:
      "Dual-phase boost supply for the power bank's programmable USB-C output.",
    category: "Power",
    componentName: "USBC_PowerDeliveryProgrammablePowerSupply_TPS61288",
    sourceFile:
      "USBC_PowerDeliveryProgrammablePowerSupply_TPS61288.circuit.tsx",
    tags: ["usb-c", "power-delivery", "boost", "programmable-power-supply"],
    ports: [
      powerPort({
        id: "power-in",
        label: "Power Input",
        role: "consumer",
        voltage: { min: 2.4, max: 18, nominal: 3.7 },
        positive: [".J1 > .pin1"],
        ground: [".C29 > .pin2"],
      }),
      powerPort({
        id: "usb-c-power-out",
        label: "Programmable USB-C Power",
        role: "provider",
        voltage: { min: 3, max: 18, nominal: 5 },
        positive: [".JOUT_P1 > .pin1"],
        ground: [".JOUT_P1 > .pin2"],
      }),
    ],
  }),
  adapter({
    id: "power-management-tps7a2018",
    title: "TPS7A2018 1.8 V LDO",
    description: "Always-on 1.8 V linear regulator.",
    category: "Power",
    componentName: "PowerManagement_TPS7A2018",
    sourceFile: "PowerManagement_TPS7A2018.circuit.tsx",
    tags: ["ldo", "1.8v"],
    ports: [
      powerPort({
        id: "power-in",
        label: "Power Input",
        role: "consumer",
        voltage: { min: 2, max: 6 },
        positive: [".U1 > .VIN", ".U1 > .VEN"],
        ground: [".U1 > .GND"],
      }),
      powerPort({
        id: "power-1v8-out",
        label: "1.8 V Power",
        role: "provider",
        voltage: 1.8,
        positive: [".U1 > .VOUT"],
        ground: [".U1 > .GND"],
        allowMultiple: true,
      }),
    ],
  }),
  adapter({
    id: "bluetooth-controller-cc2564c",
    title: "CC2564C Bluetooth Controller",
    description: "Dual-mode Bluetooth radio with HCI UART and PCM/I2S.",
    category: "Wireless",
    componentName: "BluetoothController_CC2564C",
    sourceFile: "BluetoothController_CC2564C.circuit.tsx",
    tags: ["bluetooth", "hci", "i2s"],
    ports: [
      powerPort({
        id: "radio-power",
        label: "Radio Power",
        role: "consumer",
        voltage: { min: 2.2, max: 4.8, nominal: 3.7 },
        positive: [".U1A > .MLDO_IN"],
        ground: [".U1A > .GND"],
      }),
      powerPort({
        id: "logic-power",
        label: "1.8 V Logic Power",
        role: "consumer",
        voltage: { min: 1.7, max: 1.95, nominal: 1.8 },
        positive: [".U1A > .VDD_IO", ".Y1 > .VCC"],
        ground: [".U1A > .GND"],
      }),
      {
        id: "hci",
        label: "HCI",
        kind: "data",
        role: "device",
        protocol: "hci-uart",
        requiredSignals: ["tx", "rx", "rts", "cts", "shutdown", "slow_clock"],
        signals: [
          signal("tx", "output", [".U1A > .HCI_TX"]),
          signal("rx", "input", [".U1A > .HCI_RX"]),
          signal("rts", "output", [".U1A > .HCI_RTS"]),
          signal("cts", "input", [".U1A > .HCI_CTS"]),
          signal("shutdown", "input", [".U1A > .N_SHUTD"]),
          signal("slow_clock", "input", [".U1A > .SLOW_CLK"]),
        ],
      },
      {
        id: "digital-audio-out",
        label: "I2S Audio",
        kind: "data",
        role: "source",
        protocol: "i2s",
        requiredSignals: ["bclk", "wclk", "data"],
        signals: [
          signal("bclk", "output", [".U1A > .AUD_CLK"]),
          signal("wclk", "output", [".U1A > .AUD_FSYNC"]),
          signal("data", "output", [".U1A > .AUD_OUT"]),
        ],
      },
    ],
  }),
  adapter({
    id: "bluetooth-audio-host-msp430f5229",
    title: "MSP430F5229 Bluetooth Audio Host",
    description: "Host MCU adapter matching the TI Bluetooth audio example.",
    category: "Processors",
    componentName: "BluetoothAudioHost_MSP430F5229",
    sourceFile: "BluetoothAudioHost_MSP430F5229.circuit.tsx",
    tags: ["msp430", "bluetooth", "host"],
    ports: [
      powerPort({
        id: "logic-power",
        label: "1.8 V Logic Power",
        role: "consumer",
        voltage: { min: 1.7, max: 1.95, nominal: 1.8 },
        positive: [".U10 > .DVIO", ".U10 > .DVCC"],
        ground: [".U10 > .DVSS"],
      }),
      {
        id: "hci",
        label: "HCI",
        kind: "data",
        role: "host",
        protocol: "hci-uart",
        requiredSignals: ["tx", "rx", "rts", "cts", "shutdown", "slow_clock"],
        signals: [
          signal("tx", "output", [".U10 > .UART_TXD"]),
          signal("rx", "input", [".U10 > .UART_RXD"]),
          signal("rts", "output", [".U10 > .P1_5"]),
          signal("cts", "input", [".U10 > .P1_4"]),
          signal("shutdown", "output", [".U10 > .P1_7"]),
          signal("slow_clock", "output", [".R10 > .pin2"]),
        ],
      },
      {
        id: "audio-control",
        label: "I2C Audio Control",
        kind: "data",
        role: "host",
        protocol: "i2c",
        requiredSignals: ["scl", "sda", "reset"],
        allowMultiple: true,
        signals: [
          signal("scl", "output", [".U10 > .I2C_SCL"]),
          signal("sda", "bidirectional", [".U10 > .I2C_SDA"]),
          signal("reset", "output", [".U10 > .P2_0"]),
        ],
      },
    ],
  }),
  adapter({
    id: "audio-amplifier-tas2505",
    title: "TAS2505 Audio Amplifier",
    description: "Mono speaker amplifier with I2C control and I2S input.",
    category: "Audio",
    componentName: "AudioAmplifier_TAS2505",
    sourceFile: "AudioAmplifier_TAS2505.circuit.tsx",
    tags: ["audio", "amplifier", "i2c", "i2s"],
    ports: [
      powerPort({
        id: "speaker-power",
        label: "Speaker Power",
        role: "consumer",
        voltage: { min: 2.7, max: 5.5, nominal: 3.7 },
        positive: [".U1 > .SPKVDD"],
        ground: [".U1 > .AVSS"],
      }),
      powerPort({
        id: "logic-power",
        label: "1.8 V Logic Power",
        role: "consumer",
        voltage: { min: 1.65, max: 1.95, nominal: 1.8 },
        positive: [".U1 > .AVDD", ".U1 > .DVDD", ".U1 > .IOVDD", ".R1 > .pin1"],
        ground: [".U1 > .AVSS"],
      }),
      {
        id: "control",
        label: "I2C Control",
        kind: "data",
        role: "device",
        protocol: "i2c",
        requiredSignals: ["scl", "sda", "reset"],
        signals: [
          signal("scl", "input", [".U1 > .SCL"]),
          signal("sda", "bidirectional", [".U1 > .SDA"]),
          signal("reset", "input", [".U1 > .N_RST"]),
        ],
      },
      {
        id: "digital-audio-in",
        label: "I2S Audio",
        kind: "data",
        role: "sink",
        protocol: "i2s",
        requiredSignals: ["bclk", "wclk", "data"],
        signals: [
          signal("bclk", "input", [".U1 > .BCLK", ".U1 > .MCLK"]),
          signal("wclk", "input", [".U1 > .WCLK"]),
          signal("data", "input", [".U1 > .DIN"]),
        ],
      },
    ],
  }),
  adapter({
    id: "environmental-sensor-hdc2080",
    title: "HDC2080 Environmental Sensor",
    category: "Sensors",
    componentName: "EnvironmentalSensor_HDC2080",
    sourceFile: "EnvironmentalSensor_HDC2080.circuit.tsx",
    tags: ["humidity", "temperature", "i2c"],
    warning:
      "This reference block includes an embedded MCU/host connector fixture in addition to the sensor.",
    ports: [
      powerPort({
        id: "power-in",
        label: "Sensor Power",
        role: "consumer",
        voltage: { min: 1.62, max: 3.6, nominal: 3.3 },
        positive: [".U1 > .VDD"],
        ground: [".U1 > .GND"],
      }),
      {
        id: "i2c",
        label: "I2C",
        kind: "data",
        role: "device",
        protocol: "i2c",
        requiredSignals: ["scl", "sda"],
        signals: [
          signal("scl", "input", [".U1 > .SCL"]),
          signal("sda", "bidirectional", [".U1 > .SDA"]),
          signal("interrupt", "output", [".U1 > .DRDY_INT"], false),
        ],
      },
    ],
  }),
  adapter({
    id: "temperature-sensor-tmp1075",
    title: "TMP1075 Temperature Sensor",
    category: "Sensors",
    componentName: "TemperatureSensor_TMP1075",
    sourceFile: "TemperatureSensor_TMP1075.circuit.tsx",
    tags: ["temperature", "i2c"],
    warning:
      "This reference block includes an embedded two-wire host-controller fixture.",
    ports: [
      powerPort({
        id: "power-in",
        label: "Sensor Power",
        role: "consumer",
        voltage: { min: 1.7, max: 5.5, nominal: 3.3 },
        positive: [".U1 > .V_PLUS"],
        ground: [".U1 > .GND"],
      }),
      {
        id: "i2c",
        label: "I2C",
        kind: "data",
        role: "device",
        protocol: "i2c",
        requiredSignals: ["scl", "sda"],
        signals: [
          signal("scl", "input", [".U1 > .SCL"]),
          signal("sda", "bidirectional", [".U1 > .SDA"]),
          signal("interrupt", "output", [".U1 > .ALERT"], false),
        ],
      },
    ],
  }),
  adapter({
    id: "real-time-clock-bq32002",
    title: "BQ32002 Real-Time Clock",
    category: "Timing",
    componentName: "RealTimeClock_BQ32002",
    sourceFile: "RealTimeClock_BQ32002.circuit.tsx",
    tags: ["rtc", "i2c"],
    ports: [
      powerPort({
        id: "power-in",
        label: "RTC Power",
        role: "consumer",
        voltage: { min: 3, max: 3.6, nominal: 3.3 },
        positive: [".U1 > .VCC"],
        ground: [".U1 > .GND"],
      }),
      {
        id: "i2c",
        label: "I2C",
        kind: "data",
        role: "device",
        protocol: "i2c",
        requiredSignals: ["scl", "sda"],
        signals: [
          signal("scl", "input", [".U1 > .SCL"]),
          signal("sda", "bidirectional", [".U1 > .SDA"]),
          signal("interrupt", "output", [".U1 > .IRQ"], false),
        ],
      },
    ],
  }),
  adapter({
    id: "power-supply-lm74202-tps7e81-q1",
    title: "LM74202 and TPS7E81-Q1 Power Supply",
    description:
      "Automotive reverse-battery protection with protected 12 V and regulated 3.3 V rails.",
    category: "Power",
    componentName: "PowerSupply_LM74202_TPS7E81_Q1",
    sourceFile: "PowerSupply_LM74202_TPS7E81_Q1.circuit.tsx",
    sourceRoot: THIRD_PARTY_SOURCE_ROOT,
    tags: ["automotive", "power-supply", "reverse-battery", "3.3v"],
    ports: [
      powerPort({
        id: "battery-power-in",
        label: "Vehicle Battery",
        role: "consumer",
        voltage: { min: 6, max: 42, nominal: 12 },
        positive: [".U1 > .IN"],
        ground: [".U1 > .GND"],
        protocol: "vehicle-battery",
      }),
      powerPort({
        id: "protected-power-out",
        label: "Protected Vehicle Power",
        role: "provider",
        voltage: { min: 6, max: 18, nominal: 12 },
        positive: [".U1 > .OUT"],
        ground: [".U1 > .GND"],
        allowMultiple: true,
        protocol: "protected-vehicle-power",
      }),
      powerPort({
        id: "logic-3v3-out",
        label: "3.3 V Logic Power",
        role: "provider",
        voltage: 3.3,
        positive: [".U2 > .OUT"],
        ground: [".U2 > .GND"],
        allowMultiple: true,
        protocol: "logic-3v3",
      }),
      {
        id: "power-monitor",
        label: "Power Monitoring",
        kind: "data",
        role: "source",
        protocol: "power-monitor",
        requiredSignals: ["health", "load"],
        signals: [
          signal("health", "output", [".U1 > .FLT"]),
          signal("load", "output", [".U1 > .IMON"]),
        ],
      },
      {
        id: "power-control",
        label: "Power On/Off Control",
        kind: "data",
        role: "peripheral",
        protocol: "power-control",
        requiredSignals: ["enable"],
        signals: [signal("enable", "input", [".U1 > .SHDN"])],
      },
    ],
  }),
  adapter({
    id: "communication-interface-tcan1042-tida01428",
    title: "TCAN1042 CAN Interface",
    category: "Interfaces",
    componentName: "CommunicationInterface_TCAN1042_TIDA01428",
    sourceFile: "CommunicationInterface_TCAN1042_TIDA01428.circuit.tsx",
    tags: ["can", "automotive"],
    ports: [
      {
        id: "transceiver-power",
        label: "5 V Transceiver Power",
        kind: "power",
        role: "consumer",
        voltage: { min: 4.5, max: 5.5, nominal: 5 },
        requiredSignals: ["positive", "ground"],
        signals: [
          signal("positive", "input", [".R21 > .pin1"]),
          signal("ground", "passive", [".U6 > .GND"]),
        ],
      },
      {
        id: "logic-power",
        label: "3.3 V Logic Power",
        kind: "power",
        role: "consumer",
        voltage: { min: 1.7, max: 5.5, nominal: 3.3 },
        requiredSignals: ["positive", "ground"],
        signals: [
          signal("positive", "input", [".R22 > .pin1"]),
          signal("ground", "passive", [".U6 > .GND"]),
        ],
      },
      {
        id: "controller",
        label: "CAN Controller",
        kind: "data",
        role: "peripheral",
        protocol: "can-controller",
        requiredSignals: ["tx", "rx", "standby"],
        signals: [
          signal("tx", "input", [".U6 > .TXD"]),
          signal("rx", "output", [".U6 > .RXD"]),
          signal("standby", "input", [".U6 > .STB"]),
        ],
      },
      {
        id: "can-bus",
        label: "CAN Bus",
        kind: "data",
        role: "peer",
        protocol: "can-bus",
        requiredSignals: ["can_h", "can_l"],
        allowMultiple: true,
        signals: [
          signal("can_h", "bidirectional", [".R23 > .pin1"]),
          signal("can_l", "bidirectional", [".R24 > .pin2"]),
        ],
      },
    ],
  }),
  adapter({
    id: "power-supply-lm5050-tida00992",
    title: "TIDA-00992 LM5050-Q1 Power Supply",
    description:
      "Automotive ideal-diode and reverse-battery protection stage for the seat module.",
    category: "Power",
    componentName: "PowerSupply_LM5050_TIDA00992",
    sourceFile: "PowerSupply_LM5050_TIDA00992.circuit.tsx",
    tags: ["automotive", "ideal-diode", "reverse-battery", "lm5050"],
    ports: [
      powerPort({
        id: "battery-power-in",
        label: "Vehicle Battery",
        role: "consumer",
        voltage: { min: 4.3, max: 42, nominal: 12 },
        positive: [".U1 > .IN"],
        ground: [".U1 > .GND"],
        protocol: "vehicle-battery",
      }),
      powerPort({
        id: "protected-power-out",
        label: "Protected Vehicle Power",
        role: "provider",
        voltage: { min: 6, max: 18, nominal: 12 },
        positive: [".U1 > .OUT"],
        ground: [".U1 > .GND"],
        allowMultiple: true,
        protocol: "protected-vehicle-power",
      }),
      {
        id: "power-control",
        label: "Power Enable",
        kind: "data",
        role: "peripheral",
        protocol: "seat-power-control",
        requiredSignals: ["enable"],
        signals: [signal("enable", "input", [".R3 > .pin1"])],
      },
    ],
  }),
  adapter({
    id: "power-supply-window-module",
    title: "Automotive Window Power Supply",
    description:
      "TIDA-050008 reverse-battery protection, 3.3 V regulator, reset supervisor, and window watchdog.",
    category: "Power",
    componentName: "PowerSupply_WindowModule",
    sourceFile: "PowerSupply_WindowModule.circuit.tsx",
    tags: ["automotive", "window", "power-supply", "watchdog", "tida-050008"],
    hasInternalSchematicSheets: true,
    ports: [
      powerPort({
        id: "logic-3v3-out",
        label: "3.3 V Logic Power",
        role: "provider",
        voltage: 3.3,
        positive: [".regulator .P3 > .pin1"],
        ground: [".reverseBattery .P2 > .pin1"],
        allowMultiple: true,
        protocol: "logic-3v3",
      }),
      {
        id: "power-supervision",
        label: "Power Control and Supervision",
        kind: "data",
        role: "peripheral",
        protocol: "window-power-supervision",
        requiredSignals: [
          "reset",
          "voltage_control",
          "watchdog_input",
          "watchdog_output",
        ],
        signals: [
          signal("reset", "output", [".supervisorWatchdog .TP6 > .pin1"]),
          signal("voltage_control", "input", [".regulator .TP5 > .pin1"]),
          signal("watchdog_input", "input", [
            ".supervisorWatchdog .TP1 > .pin1",
          ]),
          signal("watchdog_output", "output", [
            ".supervisorWatchdog .TP8 > .pin1",
          ]),
        ],
      },
    ],
  }),
  adapter({
    id: "communication-interface-lin-tlin1028",
    title: "TLIN1028-Q1 LIN Interface",
    description:
      "Automotive LIN transceiver and 3.3 V logic interface from TIDA-020027.",
    category: "Interfaces",
    componentName: "CommunicationInterface_LIN_TLIN1028",
    sourceFile: "CommunicationInterface_LIN_TLIN1028.circuit.tsx",
    tags: ["automotive", "window", "lin", "tlin1028", "tida-020027"],
    ports: [
      powerPort({
        id: "logic-power",
        label: "3.3 V Logic Power",
        role: "consumer",
        voltage: { min: 3, max: 3.6, nominal: 3.3 },
        positive: [".U4 > .VCC"],
        ground: [".U4 > .GND"],
        protocol: "logic-3v3",
      }),
      {
        id: "lin-controller",
        label: "LIN Controller",
        kind: "data",
        role: "peripheral",
        protocol: "lin-controller",
        requiredSignals: ["tx", "rx", "enable"],
        signals: [
          signal("tx", "input", [".U4 > .TXD"]),
          signal("rx", "output", [".U4 > .RXD"]),
          signal("enable", "input", [".U4 > .EN"]),
        ],
      },
    ],
  }),
  adapter({
    id: "microcontroller-mspm0l1306q1-tida020065",
    title: "MSPM0L1306-Q1 Microcontroller",
    description:
      "Automotive MCU reference subcircuit with power, reset, VCORE, and ROSC support.",
    category: "Processors",
    componentName: "Microcontroller_MSPM0L1306Q1_TIDA020065",
    sourceFile: "Microcontroller_MSPM0L1306Q1_TIDA020065.circuit.tsx",
    tags: ["automotive", "mcu", "mspm0", "seat-control"],
    ports: [
      powerPort({
        id: "logic-power",
        label: "3.3 V Logic Power",
        role: "consumer",
        voltage: { min: 1.62, max: 3.6, nominal: 3.3 },
        positive: [".C14 > .pin2"],
        ground: [".U6 > .VSS"],
        protocol: "logic-3v3",
      }),
      {
        id: "can-controller",
        label: "CAN Controller",
        kind: "data",
        role: "controller",
        protocol: "can-controller",
        requiredSignals: ["tx", "rx", "standby"],
        signals: [
          signal("tx", "output", [".U6 > .PA8"]),
          signal("rx", "input", [".U6 > .PA9"]),
          signal("standby", "output", [".U6 > .PA10"]),
        ],
      },
      {
        id: "position-feedback",
        label: "Position Feedback",
        kind: "data",
        role: "sink",
        protocol: "seat-position-feedback",
        requiredSignals: ["hall_1", "hall_2"],
        signals: [
          signal("hall_1", "input", [".U6 > .PA11"]),
          signal("hall_2", "input", [".U6 > .PA12"]),
        ],
      },
      {
        id: "light-control",
        label: "Light Control",
        kind: "data",
        role: "controller",
        protocol: "seat-light-control",
        requiredSignals: ["enable"],
        signals: [signal("enable", "output", [".U6 > .PA13"])],
      },
      {
        id: "power-control",
        label: "Power Enable",
        kind: "data",
        role: "controller",
        protocol: "seat-power-control",
        requiredSignals: ["enable"],
        signals: [signal("enable", "output", [".U6 > .PA0"])],
      },
      {
        id: "motor-control",
        label: "DRV8305 Motor Control",
        kind: "data",
        role: "controller",
        protocol: "seat-motor-control",
        requiredSignals: [
          "fault",
          "wake",
          "chip_select",
          "clock",
          "serial_in",
          "serial_out",
          "in_ha",
          "in_la",
          "in_hb",
          "in_lb",
          "in_hc",
          "in_lc",
          "gate_enable",
        ],
        signals: [
          signal("fault", "input", [".U6 > .PA1"]),
          signal("wake", "output", [".U6 > .PA3"]),
          signal("chip_select", "output", [".U6 > .PA4"]),
          signal("clock", "output", [".U6 > .PA5"]),
          signal("serial_in", "output", [".U6 > .PA6"]),
          signal("serial_out", "input", [".U6 > .PA7"]),
          signal("in_ha", "output", [".U6 > .PA21"]),
          signal("in_la", "output", [".U6 > .PA22"]),
          signal("in_hb", "output", [".U6 > .PA23"]),
          signal("in_lb", "output", [".U6 > .PA24"]),
          signal("in_hc", "output", [".U6 > .PA25"]),
          signal("in_lc", "output", [".U6 > .PA26"]),
          signal("gate_enable", "output", [".U6 > .PA27"]),
        ],
      },
    ],
  }),
  adapter({
    id: "microcontroller-msp430fr6007",
    title: "MSP430FR6007 Microcontroller",
    description:
      "MSP430FR6007 target-board implementation used by the automotive window module.",
    category: "Processors",
    componentName: "Microcontroller_MSP430FR6007",
    sourceFile: "Microcontroller_MSP430FR6007.circuit.tsx",
    tags: ["automotive", "window", "mcu", "msp430", "msp430fr6007"],
    hasInternalSchematicSheets: true,
    ports: [
      powerPort({
        id: "logic-power",
        label: "3.3 V MCU Power",
        role: "consumer",
        voltage: { min: 1.8, max: 3.6, nominal: 3.3 },
        positive: [".IC1 > .AVCC", ".IC1 > .DVCC", ".IC1 > .PVCC"],
        ground: [".IC1 > .AVSS", ".IC1 > .DVSS"],
        protocol: "logic-3v3",
      }),
      {
        id: "power-supervision",
        label: "Power Control and Supervision",
        kind: "data",
        role: "controller",
        protocol: "window-power-supervision",
        requiredSignals: [
          "reset",
          "voltage_control",
          "watchdog_input",
          "watchdog_output",
        ],
        signals: [
          signal("reset", "input", [".IC1 > .RST"]),
          signal("voltage_control", "output", [".IC1 > .P1_0"]),
          signal("watchdog_input", "output", [".IC1 > .P1_3"]),
          signal("watchdog_output", "input", [".IC1 > .P1_1"]),
        ],
      },
      {
        id: "lin-controller",
        label: "LIN Controller",
        kind: "data",
        role: "controller",
        protocol: "lin-controller",
        requiredSignals: ["tx", "rx", "enable"],
        signals: [
          signal("tx", "output", [".IC1 > .UCA0TXD"]),
          signal("rx", "input", [".IC1 > .UCA0RXD"]),
          signal("enable", "output", [".IC1 > .P2_2"]),
        ],
      },
      {
        id: "motor-control",
        label: "DRV8703 Motor Control",
        kind: "data",
        role: "controller",
        protocol: "window-motor-control",
        requiredSignals: [
          "phase",
          "enable",
          "sleep",
          "clock",
          "serial_in",
          "serial_out",
          "chip_select",
          "current_sense",
          "fault",
        ],
        signals: [
          signal("phase", "output", [".IC1 > .P2_6"]),
          signal("enable", "output", [".IC1 > .P2_5"]),
          signal("sleep", "output", [".IC1 > .P2_4"]),
          signal("clock", "output", [".IC1 > .UCA2CLK"]),
          signal("serial_in", "output", [".IC1 > .UCA2SIMO"]),
          signal("serial_out", "input", [".IC1 > .UCA2SOMI"]),
          signal("chip_select", "output", [".IC1 > .P5_3"]),
          signal("current_sense", "input", [".IC1 > .A10"]),
          signal("fault", "input", [".IC1 > .P3_5"]),
        ],
      },
      {
        id: "pinch-detection",
        label: "Anti-Pinch Detection",
        kind: "data",
        role: "sink",
        protocol: "window-pinch-detection",
        requiredSignals: ["adc_motor", "timer"],
        signals: [
          signal("adc_motor", "input", [".IC1 > .A11"]),
          signal("timer", "input", [".IC1 > .P8_0"]),
        ],
      },
      {
        id: "thermal-status",
        label: "Motor Thermal Status",
        kind: "data",
        role: "sink",
        protocol: "motor-thermal-status",
        requiredSignals: ["hot", "cold"],
        signals: [
          signal("hot", "input", [".IC1 > .P3_6"]),
          signal("cold", "input", [".IC1 > .P3_7"]),
        ],
      },
      {
        id: "window-position-feedback",
        label: "Window Position Feedback",
        kind: "data",
        role: "sink",
        protocol: "window-position-feedback",
        requiredSignals: ["hall_1", "hall_2"],
        signals: [
          signal("hall_1", "input", [".IC1 > .P3_0"]),
          signal("hall_2", "input", [".IC1 > .P3_1"]),
        ],
      },
    ],
  }),
  adapter({
    id: "motor-driver-drv8703",
    title: "TIDA-01389 DRV8703 Motor Driver",
    description:
      "DRV8703-Q1 gate driver and SQJ940EP H-bridge for the automotive window motor.",
    category: "Motor Control",
    componentName: "MotorDriver_DRV8703",
    sourceFile: "MotorDriver_DRV8703.circuit.tsx",
    tags: [
      "automotive",
      "window",
      "motor",
      "h-bridge",
      "drv8703",
      "tida-01389",
    ],
    ports: [
      powerPort({
        id: "motor-power",
        label: "Window Motor Power",
        role: "consumer",
        voltage: { min: 5.9, max: 45, nominal: 12 },
        positive: [".gateDriver .U1 > .PVDD"],
        ground: [".gateDriver .U1 > .pin33"],
        protocol: "window-motor-power",
      }),
      powerPort({
        id: "logic-power",
        label: "3.3 V Logic Power",
        role: "consumer",
        voltage: { min: 0, max: 5.3, nominal: 3.3 },
        positive: [".gateDriver .U1 > .VREF"],
        ground: [".gateDriver .U1 > .pin33"],
        protocol: "logic-3v3",
      }),
      {
        id: "motor-control",
        label: "DRV8703 Motor Control",
        kind: "data",
        role: "peripheral",
        protocol: "window-motor-control",
        requiredSignals: [
          "phase",
          "enable",
          "sleep",
          "clock",
          "serial_in",
          "serial_out",
          "chip_select",
          "current_sense",
          "fault",
        ],
        signals: [
          signal("phase", "input", [".gateDriver .U1 > .IN1_PH"]),
          signal("enable", "input", [".gateDriver .U1 > .IN2_EN"]),
          signal("sleep", "input", [".gateDriver .U1 > .nSLEEP"]),
          signal("clock", "input", [".gateDriver .U1 > .SCLK"]),
          signal("serial_in", "input", [".gateDriver .U1 > .SDI"]),
          signal("serial_out", "output", [".gateDriver .U1 > .SDO"]),
          signal("chip_select", "input", [".gateDriver .U1 > .nSCS"]),
          signal("current_sense", "output", [".gateDriver .U1 > .SO"]),
          signal("fault", "output", [".gateDriver .U1 > .nFAULT"]),
        ],
      },
    ],
  }),
  adapter({
    id: "pinch-detection-ina240-tlv2316-lmv7275",
    title: "TIDA-01421 Pinch Detection",
    description:
      "Inline motor-current sensing, amplification, and anti-pinch threshold detection.",
    category: "Sensors",
    componentName: "PinchDetection_INA240_TLV2316_LMV7275",
    sourceFile: "PinchDetection_INA240_TLV2316_LMV7275.circuit.tsx",
    schematicSheetSize: { width: "430mm", height: "280mm" },
    tags: ["automotive", "window", "anti-pinch", "current-sense", "tida-01421"],
    ports: [
      powerPort({
        id: "motor-power-out",
        label: "Sensed Window Motor Power",
        role: "provider",
        voltage: { min: 6, max: 18, nominal: 12 },
        positive: [".signalChain .J1 > .V_MINUS"],
        ground: [".signalChain .U2 > .GND"],
        protocol: "window-motor-power",
      }),
      {
        id: "pinch-detection",
        label: "Anti-Pinch Detection",
        kind: "data",
        role: "source",
        protocol: "window-pinch-detection",
        requiredSignals: ["adc_motor", "timer"],
        signals: [
          signal("adc_motor", "output", [".signalChain .R20 > .pin2"]),
          signal("timer", "output", [".signalChain .R4 > .pin1"]),
        ],
      },
    ],
  }),
  adapter({
    id: "motor-thermal-protection-tmp390",
    title: "TMP390-Q1 Motor Thermal Protection",
    description:
      "Dual-threshold hot and cold motor-temperature protection using TMP390-Q1.",
    category: "Sensors",
    componentName: "MotorThermalProtection_TMP390",
    sourceFile: "MotorThermalProtection_TMP390.circuit.tsx",
    tags: ["automotive", "window", "thermal", "temperature", "tmp390"],
    ports: [
      powerPort({
        id: "logic-power",
        label: "3.3 V Sensor Power",
        role: "consumer",
        voltage: { min: 1.62, max: 5.5, nominal: 3.3 },
        positive: [".VDD", ".VDDIO"],
        ground: [".GND"],
        protocol: "logic-3v3",
      }),
      {
        id: "thermal-status",
        label: "Motor Thermal Status",
        kind: "data",
        role: "source",
        protocol: "motor-thermal-status",
        requiredSignals: ["hot", "cold"],
        signals: [
          signal("hot", "output", [".OUTA"]),
          signal("cold", "output", [".OUTB"]),
        ],
      },
    ],
  }),
  adapter({
    id: "position-feedback-drv5013-tida01389",
    title: "TIDA-01389 Position Feedback",
    description: "Dual DRV5013-Q1 Hall-effect position feedback channels.",
    category: "Sensors",
    componentName: "PositionFeedback_DRV5013_TIDA01389",
    sourceFile: "PositionFeedback_DRV5013_TIDA01389.circuit.tsx",
    tags: ["automotive", "hall-effect", "position", "drv5013"],
    ports: [
      powerPort({
        id: "logic-power",
        label: "3.3 V Sensor Power",
        role: "consumer",
        voltage: { min: 2.5, max: 38, nominal: 3.3 },
        positive: [".U6 > .VCC"],
        ground: [".U6 > .GND"],
        protocol: "logic-3v3",
      }),
      {
        id: "position-feedback",
        label: "Position Feedback",
        kind: "data",
        role: "source",
        protocol: "seat-position-feedback",
        requiredSignals: ["hall_1", "hall_2"],
        signals: [
          signal("hall_1", "output", [".U6 > .OUT"]),
          signal("hall_2", "output", [".U5 > .OUT"]),
        ],
      },
      {
        id: "window-position-feedback",
        label: "Window Position Feedback",
        kind: "data",
        role: "source",
        protocol: "window-position-feedback",
        requiredSignals: ["hall_1", "hall_2"],
        signals: [
          signal("hall_1", "output", [".U6 > .OUT"]),
          signal("hall_2", "output", [".U5 > .OUT"]),
        ],
      },
    ],
  }),
  adapter({
    id: "light-driver-tida01330",
    title: "TIDA-01330 Light Driver",
    description: "Automotive low-side seat-light switch and indicator output.",
    category: "Drivers",
    componentName: "LightDriver_TIDA01330",
    sourceFile: "LightDriver_TIDA01330.circuit.tsx",
    tags: ["automotive", "light", "low-side-switch", "tida-01330"],
    ports: [
      powerPort({
        id: "protected-power",
        label: "Protected Vehicle Power",
        role: "consumer",
        voltage: { min: 6, max: 18, nominal: 12 },
        positive: [".R3 > .pin1"],
        ground: ["net.GND"],
        protocol: "protected-vehicle-power",
      }),
      {
        id: "light-control",
        label: "Light Control",
        kind: "data",
        role: "peripheral",
        protocol: "seat-light-control",
        requiredSignals: ["enable"],
        signals: [signal("enable", "input", [".R4 > .pin1"])],
      },
    ],
  }),
  adapter({
    id: "motor-driver-drv8305-tida01330",
    title: "TIDA-01330 DRV8305 Motor Driver",
    description:
      "Three-phase DRV8305-Q1 gate-driver reference stage used for the seat motor block.",
    category: "Motor Control",
    componentName: "MotorDriver_DRV8305_TIDA01330",
    sourceFile: "MotorDriver_DRV8305_TIDA01330.circuit.tsx",
    tags: ["automotive", "motor", "gate-driver", "drv8305"],
    ports: [
      powerPort({
        id: "protected-power",
        label: "Protected Vehicle Power",
        role: "consumer",
        voltage: { min: 6, max: 18, nominal: 12 },
        positive: [".U1 > .PVDD"],
        ground: [".U1 > .GND1"],
        protocol: "protected-vehicle-power",
      }),
      powerPort({
        id: "logic-power",
        label: "3.3 V Logic Power",
        role: "consumer",
        voltage: { min: 3, max: 3.6, nominal: 3.3 },
        positive: [".C18 > .pin1"],
        ground: [".U1 > .GND1"],
        protocol: "logic-3v3",
      }),
      {
        id: "motor-control",
        label: "DRV8305 Motor Control",
        kind: "data",
        role: "peripheral",
        protocol: "seat-motor-control",
        requiredSignals: [
          "fault",
          "wake",
          "chip_select",
          "clock",
          "serial_in",
          "serial_out",
          "in_ha",
          "in_la",
          "in_hb",
          "in_lb",
          "in_hc",
          "in_lc",
          "gate_enable",
        ],
        signals: [
          signal("fault", "output", [".U1 > .nFAULT"]),
          signal("wake", "input", [".U1 > .WAKE"]),
          signal("chip_select", "input", [".U1 > .nSCS"]),
          signal("clock", "input", [".U1 > .SCLK"]),
          signal("serial_in", "input", [".U1 > .SDI"]),
          signal("serial_out", "output", [".U1 > .SDO"]),
          signal("in_ha", "input", [".U1 > .INHA"]),
          signal("in_la", "input", [".U1 > .INLA"]),
          signal("in_hb", "input", [".U1 > .INHB"]),
          signal("in_lb", "input", [".U1 > .INLB"]),
          signal("in_hc", "input", [".U1 > .INHC"]),
          signal("in_lc", "input", [".U1 > .INLC"]),
          signal("gate_enable", "input", [".U1 > .EN_GATE"]),
        ],
      },
    ],
  }),
  adapter({
    id: "motor-driver-drv8833",
    title: "DRV8833 Dual Motor Driver",
    category: "Motor Control",
    componentName: "MotorDriver_DRV8833",
    sourceFile: "MotorDriver_DRV8833.circuit.tsx",
    tags: ["motor", "h-bridge", "pwm"],
    warning:
      "This reference block includes an embedded motor/load fixture and ties both H-bridge channels together.",
    ports: [
      powerPort({
        id: "motor-power",
        label: "Motor Power",
        role: "consumer",
        voltage: { min: 2.7, max: 10.8, nominal: 5 },
        positive: [".U1 > .VM"],
        ground: [".U1 > .GND"],
      }),
      {
        id: "control",
        label: "Motor Control",
        kind: "data",
        role: "device",
        protocol: "motor-control",
        requiredSignals: ["in1", "in2"],
        signals: [
          signal("in1", "input", [".U1 > .AIN1", ".U1 > .BIN1"]),
          signal("in2", "input", [".U1 > .AIN2", ".U1 > .BIN2"]),
        ],
      },
    ],
  }),
  adapter({
    id: "microcontroller-mspm0g3507",
    title: "MSPM0G3507 Microcontroller",
    category: "Processors",
    componentName: "Microcontroller_MSPM0G3507",
    sourceFile: "Microcontroller_MSPM0G3507.circuit.tsx",
    tags: ["mcu"],
    ports: [
      powerPort({
        id: "power-in",
        label: "MCU Power",
        role: "consumer",
        voltage: { min: 1.62, max: 3.6, nominal: 3.3 },
        positive: [".U1 > .VDD"],
        ground: [".U1 > .VSS"],
        protocol: "logic-3v3",
      }),
      {
        id: "can-controller",
        label: "CAN Controller",
        kind: "data",
        role: "controller",
        protocol: "can-controller",
        requiredSignals: ["tx", "rx", "standby"],
        signals: [
          signal("tx", "output", [".U1 > .CAN_TX"]),
          signal("rx", "input", [".U1 > .CAN_RX"]),
          signal("standby", "output", [".U1 > .PA7"]),
        ],
      },
      {
        id: "i2c",
        label: "I2C",
        kind: "data",
        role: "host",
        protocol: "i2c",
        requiredSignals: ["scl", "sda"],
        allowMultiple: true,
        signals: [
          signal("scl", "output", [".U1 > .I2C0_SCL"]),
          signal("sda", "bidirectional", [".U1 > .I2C0_SDA"]),
        ],
      },
      {
        id: "power-monitor",
        label: "Power Monitoring",
        kind: "data",
        role: "sink",
        protocol: "power-monitor",
        requiredSignals: ["health", "load"],
        signals: [
          signal("health", "input", [".U1 > .PA15"]),
          signal("load", "input", [".U1 > .PA14"]),
        ],
      },
      {
        id: "temperature-sense",
        label: "Temperature Sense",
        kind: "data",
        role: "sink",
        protocol: "analog-temperature",
        requiredSignals: ["sense"],
        signals: [signal("sense", "input", [".U1 > .PA27"])],
      },
      {
        id: "ambient-light-alerts",
        label: "Ambient Light Alerts",
        kind: "data",
        role: "sink",
        protocol: "ambient-light-alerts",
        requiredSignals: ["back", "front"],
        signals: [
          signal("back", "input", [".U1 > .PA8"]),
          signal("front", "input", [".U1 > .PA9"]),
        ],
      },
      {
        id: "mirror-control",
        label: "Mirror Control",
        kind: "data",
        role: "controller",
        protocol: "mirror-control",
        requiredSignals: ["discharge"],
        signals: [signal("discharge", "output", [".U1 > .PA10"])],
      },
      {
        id: "lamp-control",
        label: "Lamp Control",
        kind: "data",
        role: "controller",
        protocol: "lamp-control",
        requiredSignals: ["enable", "switch"],
        signals: [
          signal("enable", "output", [".U1 > .PA11"]),
          signal("switch", "output", [".U1 > .PA16"]),
        ],
      },
    ],
  }),
  mspm0g51x7Adapter({
    id: "microcontroller-mspm0g5117",
    partNumber: "MSPM0G5117",
    componentName: "Microcontroller_MSPM0G5117",
    sourceFile: "Microcontroller_MSPM0G5117.circuit.tsx",
  }),
  mspm0g51x7Adapter({
    id: "microcontroller-mspm0g5187",
    partNumber: "MSPM0G5187",
    componentName: "Microcontroller_MSPM0G5187",
    sourceFile: "Microcontroller_MSPM0G5187.circuit.tsx",
    edgeAi: true,
  }),
  adapter({
    id: "electrochromic-mirror-driver-tida01539",
    title: "TIDA-01539 Electrochromic Mirror Driver",
    category: "Drivers",
    componentName: "ElectrochromicMirrorDriver_TIDA01539",
    sourceFile: "ElectrochromicMirrorDriver_TIDA01539.circuit.tsx",
    tags: ["automotive", "electrochromic", "mirror", "i2c"],
    ports: [
      powerPort({
        id: "logic-power",
        label: "3.3 V Logic Power",
        role: "consumer",
        voltage: { min: 2.7, max: 5.5, nominal: 3.3 },
        positive: [".U1 > .VA"],
        ground: [".U1 > .GND"],
        protocol: "logic-3v3",
      }),
      powerPort({
        id: "protected-power",
        label: "Protected Vehicle Power",
        role: "consumer",
        voltage: { min: 6, max: 18, nominal: 12 },
        positive: [".Q2 > .collector"],
        ground: [".U1 > .GND"],
        protocol: "protected-vehicle-power",
      }),
      {
        id: "i2c",
        label: "I2C",
        kind: "data",
        role: "device",
        protocol: "i2c",
        requiredSignals: ["scl", "sda"],
        signals: [
          signal("scl", "input", [".U1 > .SCL"]),
          signal("sda", "bidirectional", [".U1 > .SDA"]),
        ],
      },
      {
        id: "mirror-control",
        label: "Mirror Control",
        kind: "data",
        role: "peripheral",
        protocol: "mirror-control",
        requiredSignals: ["discharge"],
        signals: [signal("discharge", "input", [".Q1 > .base"])],
      },
    ],
  }),
  adapter({
    id: "light-sensor-opt3001-tida01539",
    title: "TIDA-01539 Ambient Light Sensors",
    category: "Sensors",
    componentName: "LightSensor_OPT3001_TIDA01539",
    sourceFile: "LightSensor_OPT3001_TIDA01539.circuit.tsx",
    tags: ["automotive", "ambient-light", "i2c", "opt3001"],
    ports: [
      powerPort({
        id: "power-in",
        label: "3.3 V Sensor Power",
        role: "consumer",
        voltage: { min: 1.6, max: 3.6, nominal: 3.3 },
        positive: [".U4Sensor .U4 > .VDD", ".U5Sensor .U5 > .VDD"],
        ground: [".U4Sensor .U4 > .GND", ".U5Sensor .U5 > .GND"],
        protocol: "logic-3v3",
      }),
      {
        id: "i2c",
        label: "I2C",
        kind: "data",
        role: "device",
        protocol: "i2c",
        requiredSignals: ["scl", "sda"],
        signals: [
          signal("scl", "input", [
            ".U4Sensor .U4 > .SCL",
            ".U5Sensor .U5 > .SCL",
          ]),
          signal("sda", "bidirectional", [
            ".U4Sensor .U4 > .SDA",
            ".U5Sensor .U5 > .SDA",
          ]),
        ],
      },
      {
        id: "ambient-light-alerts",
        label: "Ambient Light Alerts",
        kind: "data",
        role: "source",
        protocol: "ambient-light-alerts",
        requiredSignals: ["back", "front"],
        signals: [
          signal("back", "output", [".U4Sensor .U4 > .INT"]),
          signal("front", "output", [".U5Sensor .U5 > .INT"]),
        ],
      },
    ],
  }),
  adapter({
    id: "lamp-driver-tps92638-tida00356",
    title: "TIDA-00356 Lamp Driver",
    category: "Drivers",
    componentName: "LampDriver_TPS92638_TIDA00356",
    sourceFile: "LampDriver_TPS92638_TIDA00356.circuit.tsx",
    tags: ["automotive", "lamp", "led", "tps92638"],
    ports: [
      powerPort({
        id: "protected-power",
        label: "Protected Vehicle Power",
        role: "consumer",
        voltage: { min: 6, max: 18, nominal: 12 },
        positive: [".D3 > .anode"],
        ground: [".U9 > .GND"],
        protocol: "protected-vehicle-power",
      }),
      powerPort({
        id: "logic-power",
        label: "3.3 V Logic Power",
        role: "consumer",
        voltage: { min: 3, max: 3.6, nominal: 3.3 },
        positive: [".J3 > .pin3", ".R9 > .pin1"],
        ground: [".U9 > .GND"],
        protocol: "logic-3v3",
      }),
      {
        id: "lamp-control",
        label: "Lamp Control",
        kind: "data",
        role: "peripheral",
        protocol: "lamp-control",
        requiredSignals: ["enable", "switch"],
        signals: [
          signal("enable", "input", [".U9 > .EN"]),
          signal("switch", "input", [".U9 > .PWM1"]),
        ],
      },
    ],
  }),
  adapter({
    id: "temperature-sensor-lm50hv-q1",
    title: "LM50HV-Q1 Temperature Sensor",
    description:
      "Datasheet-derived remote temperature-sensor circuit for the Rearview Mirror Module.",
    category: "Sensors",
    componentName: "TemperatureSensor_LM50HV_Q1",
    sourceFile: "TemperatureSensor_LM50HV_Q1.circuit.tsx",
    sourceRoot: THIRD_PARTY_SOURCE_ROOT,
    tags: ["automotive", "temperature", "analog", "third-party"],
    ports: [
      powerPort({
        id: "power-in",
        label: "Sensor Power",
        role: "consumer",
        voltage: { min: 2.7, max: 10, nominal: 3.3 },
        positive: [".U1 > .VS"],
        ground: [".U1 > .GND"],
        protocol: "logic-3v3",
      }),
      {
        id: "temperature-sense",
        label: "Temperature Sense",
        kind: "data",
        role: "source",
        protocol: "analog-temperature",
        requiredSignals: ["sense"],
        signals: [signal("sense", "output", [".U1 > .VO"])],
      },
    ],
  }),
  adapter({
    id: "input-power-protection-tps25910-tida00890",
    title: "TPS25910 Input Power Protection",
    description:
      "Protected 5 V eFuse rail from TI reference design TIDA-00890.",
    category: "Power",
    componentName: "InputPowerProtection_TPS25910_TIDA00890",
    sourceFile: "InputPowerProtection_TPS25910_TIDA00890.circuit.tsx",
    tags: ["efuse", "input protection", "5v"],
    ports: [
      powerPort({
        id: "protected-5v-out",
        label: "Protected 5 V",
        role: "provider",
        voltage: { min: 4.75, max: 5.25, nominal: 5 },
        positive: [".U7 > .IN1"],
        ground: [".U7 > .GND1"],
      }),
    ],
  }),
  adapter({
    id: "buck-converter-tps62086-tida00399",
    title: "TPS62086 DC/DC Power Supply",
    description:
      "3.3 V buck-converter rail from TI reference design TIDA-00399.",
    category: "Power",
    componentName: "BuckConverter_TPS62086_TIDA00399",
    sourceFile: "BuckConverter_TPS62086_TIDA00399.circuit.tsx",
    tags: ["buck", "dc-dc", "3.3v"],
    ports: [
      powerPort({
        id: "power-in",
        label: "Power Input",
        role: "consumer",
        voltage: { min: 2.5, max: 6, nominal: 5 },
        positive: [".U3P3 > .VIN", ".U3P3 > .EN"],
        ground: [".U3P3 > .GND"],
      }),
      powerPort({
        id: "power-3v3-out",
        label: "3.3 V Power",
        role: "provider",
        voltage: 3.3,
        positive: [".L3P3 > .pin2"],
        ground: [".U3P3 > .GND"],
        allowMultiple: true,
      }),
    ],
  }),
  adapter({
    id: "lvds-driver-sn65lvds31-tida060017",
    title: "SN65LVDS31 I/O Connection",
    description: "LVDS output interface from TI reference design TIDA-060017.",
    category: "Interfaces",
    componentName: "LVDSDriver_SN65LVDS31_TIDA060017",
    sourceFile: "LVDSDriver_SN65LVDS31_TIDA060017.circuit.tsx",
    tags: ["lvds", "driver", "io"],
    ports: [
      powerPort({
        id: "power-in",
        label: "3.3 V Power",
        role: "consumer",
        voltage: { min: 3, max: 3.6, nominal: 3.3 },
        positive: [".U1 > .VCC", ".U1 > .ENABLE"],
        ground: [".U1 > .GND", ".U1 > .ENABLE_NOT"],
      }),
      {
        id: "logic-in",
        label: "Logic Input",
        kind: "data",
        role: "sink",
        protocol: "gpio",
        requiredSignals: ["data"],
        signals: [signal("data", "input", [".U1 > .IN1"])],
      },
      {
        id: "lvds-out",
        label: "LVDS Output",
        kind: "data",
        role: "source",
        protocol: "lvds",
        requiredSignals: ["positive", "negative", "ground"],
        signals: [
          signal("positive", "output", [".U1 > .OUT1_P"]),
          signal("negative", "output", [".U1 > .OUT1_N"]),
          signal("ground", "passive", [".U1 > .GND"]),
        ],
      },
    ],
  }),
  adapter({
    id: "wireless-antenna-w3006-tidcwl1837modcom8i",
    title: "W3006 Wireless Connectivity Antenna",
    description:
      "2.4 GHz antenna matching network from TI design TIDC-WL1837MODCOM8I.",
    category: "Wireless",
    componentName: "WirelessAntenna_W3006_TIDCWL1837MODCOM8I",
    sourceFile: "WirelessAntenna_W3006_TIDCWL1837MODCOM8I.circuit.tsx",
    tags: ["wireless", "antenna", "2.4ghz", "rf"],
    ports: [
      {
        id: "rf-in",
        label: "RF Feed",
        kind: "data",
        role: "sink",
        protocol: "rf",
        requiredSignals: ["rf"],
        signals: [signal("rf", "input", [".C5 > .pin1"])],
      },
    ],
  }),
  adapter({
    id: "wireless-connectivity-cc2540-tidccc2540bleusb",
    title: "CC2540 BLE Wireless Connectivity",
    description:
      "3.3 V CC2540 Bluetooth Low Energy radio, balun, and antenna from TI design TIDC-CC2540-BLE-USB.",
    category: "Wireless",
    componentName: "WirelessConnectivity_CC2540_TIDCCC2540BLEUSB",
    sourceFile: "WirelessConnectivity_CC2540_TIDCCC2540BLEUSB.circuit.tsx",
    tags: ["wireless", "bluetooth", "ble", "2.4ghz", "radio", "usb"],
    ports: [
      powerPort({
        id: "power-in",
        label: "3.3 V Power",
        role: "consumer",
        voltage: { min: 2, max: 3.6, nominal: 3.3 },
        positive: [".L1 > .pin2"],
        ground: [".U1 > .GND"],
      }),
      {
        id: "usb-device",
        label: "USB Device",
        kind: "data",
        role: "device",
        protocol: "usb",
        requiredSignals: ["positive", "negative", "ground"],
        signals: [
          signal("positive", "bidirectional", [".U1 > .USB_P"]),
          signal("negative", "bidirectional", [".U1 > .USB_N"]),
          signal("ground", "passive", [".U1 > .DGND_USB"]),
        ],
      },
    ],
  }),
  adapter({
    id: "input-output-protection-tpd2e009-tida00399",
    title: "TPD2E009 I/O Protection",
    description:
      "Two-channel ESD protection from TI reference design TIDA-00399.",
    category: "Protection",
    componentName: "InputOutputProtection_TPD2E009_TIDA00399",
    sourceFile: "InputOutputProtection_TPD2E009_TIDA00399.circuit.tsx",
    tags: ["esd", "io protection", "lvds"],
    ports: [
      {
        id: "protected-lvds-in",
        label: "Protected LVDS Input",
        kind: "data",
        role: "sink",
        protocol: "lvds",
        requiredSignals: ["positive", "negative", "ground"],
        signals: [
          signal("positive", "input", [".UESD > .D1"]),
          signal("negative", "input", [".UESD > .D2"]),
          signal("ground", "passive", [".UESD > .GND"]),
        ],
      },
    ],
  }),
  adapter({
    id: "logic-buffer-sn74lvc1g34",
    title: "SN74LVC1G34 Logic and Control",
    description:
      "Single non-inverting logic buffer for module control signals.",
    category: "Logic",
    componentName: "LogicBuffer_SN74LVC1G34",
    sourceFile: "LogicBuffer_SN74LVC1G34.circuit.tsx",
    tags: ["logic", "buffer", "gpio"],
    ports: [
      powerPort({
        id: "power-in",
        label: "Logic Power",
        role: "consumer",
        voltage: { min: 1.65, max: 5.5, nominal: 3.3 },
        positive: ["net.VCC"],
        ground: ["net.GND"],
      }),
      {
        id: "logic-out",
        label: "Logic Output",
        kind: "data",
        role: "source",
        protocol: "gpio",
        requiredSignals: ["data"],
        signals: [signal("data", "output", ["net.MCU_OR_LOGIC_OUT"])],
      },
    ],
  }),
  adapter({
    id: "temperature-sensor-tmp103-tida00399",
    title: "TMP103 Sensors",
    description: "I2C temperature sensor from TI reference design TIDA-00399.",
    category: "Sensors",
    componentName: "TemperatureSensor_TMP103_TIDA00399",
    sourceFile: "TemperatureSensor_TMP103_TIDA00399.circuit.tsx",
    tags: ["temperature", "sensor", "i2c"],
    ports: [
      powerPort({
        id: "power-in",
        label: "Sensor Power",
        role: "consumer",
        voltage: { min: 1.4, max: 3.6, nominal: 3.3 },
        positive: [".UTMP > .V_PLUS"],
        ground: [".UTMP > .GND"],
      }),
      {
        id: "i2c",
        label: "I2C",
        kind: "data",
        role: "device",
        protocol: "i2c",
        requiredSignals: ["scl", "sda"],
        signals: [
          signal("scl", "input", [".UTMP > .SCL"]),
          signal("sda", "bidirectional", [".UTMP > .SDA"]),
        ],
      },
    ],
  }),
  adapter({
    id: "power-management-tps7a2433-tida010266",
    title: "TPS7A2433 3.3 V Power Management",
    description:
      "TPS7A2433 input regulator stage for the blood-pressure and heart-rate monitor.",
    category: "Power",
    componentName: "PowerManagement_TPS7A2433_TIDA010266",
    sourceFile: "PowerManagement_TPS7A2433_TIDA010266.circuit.tsx",
    tags: ["blood-pressure", "heart-rate", "tida-010266", "3.3v", "ldo"],
    ports: [
      powerPort({
        id: "power-in",
        label: "Monitor Input Power",
        role: "consumer",
        voltage: { min: 3.5, max: 18, nominal: 5 },
        positive: [".VIN"],
        ground: [".GND"],
        protocol: "monitor-input-power",
      }),
      powerPort({
        id: "logic-3v3-out",
        label: "3.3 V Monitor Rail",
        role: "provider",
        voltage: 3.3,
        positive: [".V3_3"],
        ground: [".GND"],
        allowMultiple: true,
        protocol: "logic-3v3",
      }),
    ],
  }),
  adapter({
    id: "voltage-reference-atl431li-tida010266",
    title: "ATL431LI 2.5 V Voltage Reference",
    description:
      "ATL431LI precision 2.5 V reference for the monitor analog signal chain.",
    category: "Power",
    componentName: "VoltageReference_ATL431LI_TIDA010266",
    sourceFile: "VoltageReference_ATL431LI_TIDA010266.circuit.tsx",
    tags: ["blood-pressure", "heart-rate", "tida-010266", "reference"],
    ports: [
      powerPort({
        id: "logic-3v3-in",
        label: "3.3 V Input",
        role: "consumer",
        voltage: 3.3,
        positive: [".V3_3"],
        ground: [".GND"],
        protocol: "logic-3v3",
      }),
      powerPort({
        id: "reference-2v5-out",
        label: "2.5 V Precision Reference",
        role: "provider",
        voltage: 2.5,
        positive: [".VREF_2_5"],
        ground: [".GND"],
        allowMultiple: true,
        protocol: "precision-reference-2v5",
      }),
    ],
  }),
  adapter({
    id: "analog-signal-conditioning-lmv324a-tida010266",
    title: "LMV324A Analog Signal Conditioning",
    description:
      "Pressure-sensor bias, reference buffer, and oscillometric band-pass filter.",
    category: "Sensors",
    componentName: "AnalogSignalConditioning_LMV324A_TIDA010266",
    sourceFile: "AnalogSignalConditioning_LMV324A_TIDA010266.circuit.tsx",
    tags: ["blood-pressure", "heart-rate", "tida-010266", "analog-front-end"],
    ports: [
      powerPort({
        id: "logic-3v3-in",
        label: "3.3 V Analog Power",
        role: "consumer",
        voltage: 3.3,
        positive: [".V3_3"],
        ground: [".GND"],
        protocol: "logic-3v3",
      }),
      powerPort({
        id: "reference-2v5-in",
        label: "2.5 V Precision Reference",
        role: "consumer",
        voltage: 2.5,
        positive: [".VREF_2_5"],
        ground: [".GND"],
        protocol: "precision-reference-2v5",
      }),
      powerPort({
        id: "reference-1v25-out",
        label: "1.25 V Buffered Reference",
        role: "provider",
        voltage: 1.25,
        positive: [".VREF_1_25"],
        ground: [".GND"],
        allowMultiple: true,
        protocol: "buffered-reference-1v25",
      }),
      {
        id: "reference-1v25-signal",
        label: "1.25 V Analog Reference",
        kind: "data",
        role: "source",
        protocol: "buffered-reference-signal",
        requiredSignals: ["reference"],
        signals: [signal("reference", "output", [".VREF_1_25"])],
      },
      {
        id: "pressure-sensor-bias",
        label: "Pressure Sensor Bias",
        kind: "data",
        role: "controller",
        protocol: "pressure-sensor-bias",
        requiredSignals: ["drive", "feedback"],
        signals: [
          signal("drive", "output", [".SENSOR_DRIVE"]),
          signal("feedback", "input", [".IBIAS_FB"]),
        ],
      },
    ],
  }),
  adapter({
    id: "instrumentation-amplifier-ina350-tida010266",
    title: "INA350 Instrumentation Amplifier",
    description:
      "External INA350 bridge instrumentation amplifier from the monitor signal chain.",
    category: "Sensors",
    componentName: "InstrumentationAmplifier_INA350_TIDA010266",
    sourceFile: "InstrumentationAmplifier_INA350_TIDA010266.circuit.tsx",
    tags: ["blood-pressure", "heart-rate", "tida-010266", "ina350"],
    ports: [
      powerPort({
        id: "logic-3v3-in",
        label: "3.3 V Analog Power",
        role: "consumer",
        voltage: 3.3,
        positive: [".V_POS"],
        ground: [".V_NEG"],
        protocol: "logic-3v3",
      }),
      powerPort({
        id: "reference-1v25-in",
        label: "1.25 V Reference",
        role: "consumer",
        voltage: 1.25,
        positive: [".REF"],
        ground: [".V_NEG"],
        protocol: "buffered-reference-1v25",
      }),
      {
        id: "pressure-bridge-in",
        label: "Pressure Bridge Input",
        kind: "data",
        role: "sink",
        protocol: "pressure-bridge",
        requiredSignals: ["positive", "negative"],
        signals: [
          signal("positive", "input", [".IN_POS"]),
          signal("negative", "input", [".IN_NEG"]),
        ],
      },
      {
        id: "amplified-pressure-out",
        label: "Amplified Pressure Output",
        kind: "data",
        role: "source",
        protocol: "amplified-pressure",
        requiredSignals: ["signal"],
        signals: [signal("signal", "output", [".OUT"])],
      },
    ],
  }),
  adapter({
    id: "instrumentation-amplifier-mspm0l1306-internal-opa-tida010266",
    title: "MSPM0L1306 Internal OPA Instrumentation Amplifier",
    description:
      "R11-R15 instrumentation-amplifier network around the MCU's internal OPA0 and OPA1.",
    category: "Sensors",
    componentName: "InstrumentationAmplifier_MSPM0L1306_InternalOPA_TIDA010266",
    sourceFile:
      "InstrumentationAmplifier_MSPM0L1306_InternalOPA_TIDA010266.circuit.tsx",
    tags: [
      "blood-pressure",
      "heart-rate",
      "tida-010266",
      "instrumentation-amplifier",
      "internal-opa",
    ],
    ports: [
      {
        id: "reference-1v25-in",
        label: "1.25 V Analog Reference",
        kind: "data",
        role: "sink",
        protocol: "buffered-reference-signal",
        requiredSignals: ["reference"],
        signals: [signal("reference", "input", [".VREF_1_25"])],
      },
      {
        id: "internal-opa",
        label: "MSPM0 Internal OPA Nets",
        kind: "data",
        role: "peripheral",
        protocol: "internal-opa",
        requiredSignals: [
          "opa0_in_neg",
          "opa0_in_pos",
          "opa0_out",
          "opa1_in_neg",
          "opa1_in_pos",
          "opa1_out",
        ],
        signals: [
          signal("opa0_in_neg", "passive", [".OPA0_IN0_NEG"]),
          signal("opa0_in_pos", "passive", [".OPA0_IN0_POS"]),
          signal("opa0_out", "passive", [".OPA0_OUT_PORT"]),
          signal("opa1_in_neg", "passive", [".OPA1_IN0_NEG"]),
          signal("opa1_in_pos", "passive", [".OPA1_IN0_POS_PORT"]),
          signal("opa1_out", "passive", [".OPA1_OUT"]),
        ],
      },
    ],
  }),
  adapter({
    id: "pressure-sensor-2smpp03-tida010266",
    title: "2SMPP-03 Pressure Sensor",
    description:
      "Omron 2SMPP-03 bridge pressure sensor and bias-feedback resistor.",
    category: "Sensors",
    componentName: "PressureSensor_2SMPP03_TIDA010266",
    sourceFile: "PressureSensor_2SMPP03_TIDA010266.circuit.tsx",
    tags: ["blood-pressure", "heart-rate", "tida-010266", "pressure-sensor"],
    ports: [
      {
        id: "pressure-sensor-bias",
        label: "Pressure Sensor Bias",
        kind: "data",
        role: "peripheral",
        protocol: "pressure-sensor-bias",
        requiredSignals: ["drive", "feedback"],
        signals: [
          signal("drive", "input", [".SENSOR_DRIVE"]),
          signal("feedback", "output", [".IBIAS_FB"]),
        ],
      },
      {
        id: "pressure-bridge-out",
        label: "Pressure Bridge Output",
        kind: "data",
        role: "source",
        protocol: "pressure-bridge",
        requiredSignals: ["positive", "negative"],
        signals: [
          signal("positive", "output", [".BRIDGE_POS"]),
          signal("negative", "output", [".BRIDGE_NEG"]),
        ],
      },
    ],
  }),
  adapter({
    id: "microcontroller-mspm0l1306-tida010266",
    title: "MSPM0L1306 Microcontroller",
    description:
      "Monitor controller with ADC inputs and pump/valve control outputs.",
    category: "Processors",
    componentName: "Microcontroller_MSPM0L1306_TIDA010266",
    sourceFile: "Microcontroller_MSPM0L1306_TIDA010266.circuit.tsx",
    tags: ["blood-pressure", "heart-rate", "tida-010266", "mspm0"],
    ports: [
      powerPort({
        id: "logic-3v3-in",
        label: "3.3 V MCU Power",
        role: "consumer",
        voltage: 3.3,
        positive: [".U4 > .VDD"],
        ground: [".U4 > .VSS", ".U4 > .VSS_PAD"],
        protocol: "logic-3v3",
      }),
      powerPort({
        id: "reference-2v5-in",
        label: "2.5 V ADC Reference",
        role: "consumer",
        voltage: 2.5,
        positive: [".VREF_2_5"],
        ground: [".U4 > .VSS"],
        protocol: "precision-reference-2v5",
      }),
      {
        id: "internal-opa",
        label: "MSPM0 Internal OPA Nets",
        kind: "data",
        role: "controller",
        protocol: "internal-opa",
        requiredSignals: [
          "opa0_in_neg",
          "opa0_in_pos",
          "opa0_out",
          "opa1_in_neg",
          "opa1_in_pos",
          "opa1_out",
        ],
        signals: [
          signal("opa0_in_neg", "passive", [".OPA0_IN0_NEG"]),
          signal("opa0_in_pos", "passive", [".OPA0_IN0_POS"]),
          signal("opa0_out", "passive", [".OPA0_OUT"]),
          signal("opa1_in_neg", "passive", [".OPA1_IN0_NEG"]),
          signal("opa1_in_pos", "passive", [".OPA1_IN0_POS"]),
          signal("opa1_out", "passive", [".OPA1_OUT"]),
        ],
      },
      {
        id: "motor-control",
        label: "Pump and Valve Control",
        kind: "data",
        role: "controller",
        protocol: "motor-control",
        requiredSignals: ["pump", "valve"],
        signals: [
          signal("pump", "output", [".PUMP_CONTROL"]),
          signal("valve", "output", [".VALVE_CONTROL"]),
        ],
      },
    ],
  }),
  adapter({
    id: "motor-driver-drv8210-tida010266",
    title: "DRV8210 Pump and Valve Driver",
    description:
      "Dual-control motor-driver stage for the monitor pump and release valve.",
    category: "Motor Control",
    componentName: "MotorDriver_DRV8210_TIDA010266",
    sourceFile: "MotorDriver_DRV8210_TIDA010266.circuit.tsx",
    tags: ["blood-pressure", "heart-rate", "tida-010266", "pump", "valve"],
    ports: [
      powerPort({
        id: "logic-3v3-in",
        label: "3.3 V Logic Power",
        role: "consumer",
        voltage: 3.3,
        positive: [".V3_3"],
        ground: [".U6 > .GND"],
        protocol: "logic-3v3",
      }),
      {
        id: "motor-control",
        label: "Pump and Valve Control",
        kind: "data",
        role: "peripheral",
        protocol: "motor-control",
        requiredSignals: ["pump", "valve"],
        signals: [
          signal("pump", "input", [".PUMP_CONTROL"]),
          signal("valve", "input", [".VALVE_CONTROL"]),
        ],
      },
    ],
  }),
];

export const CURATED_ADAPTER_BY_COMPONENT = new Map(
  CURATED_SUBCIRCUIT_ADAPTERS.map((definition) => [
    definition.componentName,
    definition,
  ]),
);