diff --git a/packages/embeddedci-mcp/CHANGELOG.md b/packages/embeddedci-mcp/CHANGELOG.md index cab3ce0..07036a5 100644 --- a/packages/embeddedci-mcp/CHANGELOG.md +++ b/packages/embeddedci-mcp/CHANGELOG.md @@ -6,6 +6,8 @@ agent to load the board's own profile by name and shows one consistent example, the process-node bench's `process-node-stm32` profile (UART RX on LA3, I2C SCL on LA1 and SDA on LA2, the alarm on LA5). It used to mix that bench's I2C pins with the default pins' UART RX (LA5). +- `set_wiring`'s `profile` description lists the `pulls` key (the LA channels whose pull + resistor `power_on` switches on). ## 3.0.2 diff --git a/packages/embeddedci-mcp/src/embeddedci_mcp/server.py b/packages/embeddedci-mcp/src/embeddedci_mcp/server.py index 8a5ad8f..137310e 100644 --- a/packages/embeddedci-mcp/src/embeddedci_mcp/server.py +++ b/packages/embeddedci-mcp/src/embeddedci_mcp/server.py @@ -573,8 +573,10 @@ async def set_wiring( profile: Annotated[Dict[str, Any], Field(description=( "The profile as a JSON object (schema version 2): la_mv, efuse, uart_rx/uart_tx/uart_baud, " "i2c_sda/i2c_scl/i2c_addr, swd_swclk/swd_swdio/swd_nreset/swd_target, spi_*, and signals " - "[{name, la, direction, active_low, description}]. What it leaves out is undefined (not " - "wired); a pin set to null is not wired. {\"version\": 1} objects fill in the reference bench."))], + "[{name, la, direction, active_low, description}], pulls (the LA channels whose pull resistor " + "power_on switches on, e.g. [1, 2]; LA1-LA8 have one, the others it switches off; left out: " + "power_on leaves the pulls as they are). What it leaves out is undefined (not " + "wired); a pin set to null is not wired. {\"version\": 1} objects fill in the old default pins."))], save: Annotated[bool, Field(description=( "Also store it on the pod (as save_wiring does). Default false: this connection only, unless " "the server runs with --wiring-autosave."))] = False, diff --git a/packages/embeddedci-mcp/tests/conftest.py b/packages/embeddedci-mcp/tests/conftest.py index 4a91eae..310fa31 100644 --- a/packages/embeddedci-mcp/tests/conftest.py +++ b/packages/embeddedci-mcp/tests/conftest.py @@ -653,7 +653,7 @@ def fake_open(monkeypatch, fake_transport): def factory(connection, **kwargs): seen["connection"] = connection seen.update(kwargs) - # The fake bench is wired like the reference bench (version 2 profiles leave nothing wired + # The fake bench is wired on the old default pins (version 2 profiles leave nothing wired # by default); a test that names a stored profile gets the pod's lookup instead. if kwargs.get("wiring_profile"): return BenchPod(transport=fake_transport, lease=False, la_voltage=kwargs.get("la_voltage"), diff --git a/packages/embeddedci-mcp/tests/tools_surface.json b/packages/embeddedci-mcp/tests/tools_surface.json index c0f7712..0b42ea4 100644 --- a/packages/embeddedci-mcp/tests/tools_surface.json +++ b/packages/embeddedci-mcp/tests/tools_surface.json @@ -4934,7 +4934,7 @@ "properties": { "profile": { "additionalProperties": true, - "description": "The profile as a JSON object (schema version 2): la_mv, efuse, uart_rx/uart_tx/uart_baud, i2c_sda/i2c_scl/i2c_addr, swd_swclk/swd_swdio/swd_nreset/swd_target, spi_*, and signals [{name, la, direction, active_low, description}]. What it leaves out is undefined (not wired); a pin set to null is not wired. {\"version\": 1} objects fill in the reference bench.", + "description": "The profile as a JSON object (schema version 2): la_mv, efuse, uart_rx/uart_tx/uart_baud, i2c_sda/i2c_scl/i2c_addr, swd_swclk/swd_swdio/swd_nreset/swd_target, spi_*, and signals [{name, la, direction, active_low, description}], pulls (the LA channels whose pull resistor power_on switches on, e.g. [1, 2]; LA1-LA8 have one, the others it switches off; left out: power_on leaves the pulls as they are). What it leaves out is undefined (not wired); a pin set to null is not wired. {\"version\": 1} objects fill in the old default pins.", "title": "Profile", "type": "object" }, diff --git a/packages/embeddedci/tests/examples/test_bmp280_hil.py b/packages/embeddedci/tests/examples/test_bmp280_hil.py index 952dd02..fadc4b7 100644 --- a/packages/embeddedci/tests/examples/test_bmp280_hil.py +++ b/packages/embeddedci/tests/examples/test_bmp280_hil.py @@ -30,8 +30,9 @@ I2C1 SCL = PB8 <-> LA1 (4.7k pull-up) LA1 (wiring.i2c_scl) Target 5V power --benchpod-efuse (1 = internal) -I2C needs pull-ups, and only LA1-8 have them (LA1/2=4.7k, LA3/4=2.2k, LA5-8=10k); -LA9-12 have none. So the I2C lines must sit on a pull-up-capable channel — here +I2C needs pull-ups, and only LA1-6 have them (LA1/2=4.7k, LA3/4=2.2k, LA5/6=10k); +LA7/8 have 10k pull-downs and LA9-14 have none. So the I2C lines must sit on a +pull-up-capable channel — here LA1/LA2. The test enables them via `enable_pullup(...)` before arming the emulated sensor, so the open-drain bus idles high.