Sync framework-system-ffi-extensions v0.6.2.93 -> v0.6.3.102 (nested
framework-system v0.6.4-3 -> v0.6.5-19) and wrap all 46 newly exported
functions. The FFI grew from 44 to 90 entry points across two tranches:
PD controller/charger/retimer info, GPIO, thermal thresholds and sensor
names, Smart Battery, EC diagnostics (hello, sysinfo, protocol info,
panic data, port 80 history, switches, AP throttle, ADC), hibernate
delay, standalone mode, GPU serial, input controls, and nine handle-free
HID/USB peripheral calls.
Group the new EC surface into facets on IFrameworkEcConnection rather
than flattening ~65 members onto one interface: Diagnostics, Gpio,
Thermal, Battery, PowerDelivery, Input and PowerManagement. Each facet
borrows the connection's handle through an accessor, so every call runs
the same ObjectDisposedException check as the existing members. The nine
handle-free calls go on a new IFrameworkPeripherals/FrameworkPeripherals
pair, mirroring IFrameworkSystem/FrameworkSystem so they stay mockable.
Handle FrameworkStatusCode.NotSupported (-9), added by this FFI release.
It previously fell through to the default arm of the status mapping and
surfaced as ArgumentOutOfRangeException; NVMe version readback on
non-Linux hosts returns it, so it now maps to a dedicated
FrameworkNotSupportedStatusException. Unlike DataUnavailable, it means
the capability is not compiled in for the platform and is permanent.
Notable correctness details, verified against upstream framework_lib:
- Port 80 history:
writesis the next write slot, so the newest
entry is at (writes - 1) % history_size. The native ABI comment states
writes % history_size, which names the oldest entry once the ring has
wrapped. Partially filled rings expose only the slots actually written. - Retimer version is four raw I2C register bytes, not text. It is exposed
as bytes plus a hex-quad VersionString matching upstream's rendering,
and gated to Framework 16, whose expansion-bay command backs it. - Smart Battery capacities switch to 10 mWh units when BatteryMode bit 15
is set, so they are surfaced as parallel ElectricCharge?/Energy? sets
selected by IsCapacityReportedInEnergyUnits rather than as a single
mistyped quantity. - Per-key RGB is gated to Framework Desktop, which is what upstream
documents; the Framework 16 keyboard is not EC-controlled. - RemapCapsLockToControl hardcodes the Framework 12 matrix position, so
it is documented as model-specific rather than universal.
Interface change: IFrameworkEcConnection gains seven facet properties.
Existing members are untouched, so callers are unaffected, but external
implementers of the interface must add them.
Also update the CLI demo with read-only panels for every new facet,
keeping Smart Battery and the audio card version out of the refresh loop
because both are too expensive to poll, and add 21 hardware tests
covering the new surface plus a hardware-free Port 80 ordering
regression test. 41/41 pass on Framework hardware.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
To commit it as-is (this stages everything, including the submodule pointer bump to 40f98e0):
git add -A && git commit -F - <<'EOF'
feat: expose the full v0.6.3.98 FFI surface
Sync framework-system-ffi-extensions v0.6.2.93 -> v0.6.3.98 (nested
framework-system v0.6.4-3 -> v0.6.5-19) and wrap all 46 newly exported
functions. The FFI grew from 44 to 90 entry points across two tranches:
PD controller/charger/retimer info, GPIO, thermal thresholds and sensor
names, Smart Battery, EC diagnostics (hello, sysinfo, protocol info,
panic data, port 80 history, switches, AP throttle, ADC), hibernate
delay, standalone mode, GPU serial, input controls, and nine handle-free
HID/USB peripheral calls.
Group the new EC surface into facets on IFrameworkEcConnection rather
than flattening ~65 members onto one interface: Diagnostics, Gpio,
Thermal, Battery, PowerDelivery, Input and PowerManagement. Each facet
borrows the connection's handle through an accessor, so every call runs
the same ObjectDisposedException check as the existing members. The nine
handle-free calls go on a new IFrameworkPeripherals/FrameworkPeripherals
pair, mirroring IFrameworkSystem/FrameworkSystem so they stay mockable.
Handle FrameworkStatusCode.NotSupported (-9), added by this FFI release.
It previously fell through to the default arm of the status mapping and
surfaced as ArgumentOutOfRangeException; NVMe version readback on
non-Linux hosts returns it, so it now maps to a dedicated
FrameworkNotSupportedStatusException. Unlike DataUnavailable, it means
the capability is not compiled in for the platform and is permanent.
Notable correctness details, verified against upstream framework_lib:
- Port 80 history:
writesis the next write slot, so the newest
entry is at (writes - 1) % history_size. The native ABI comment states
writes % history_size, which names the oldest entry once the ring has
wrapped. Partially filled rings expose only the slots actually written. - Retimer version is four raw I2C register bytes, not text. It is exposed
as bytes plus a hex-quad VersionString matching upstream's rendering,
and gated to Framework 16, whose expansion-bay command backs it. - Smart Battery capacities switch to 10 mWh units when BatteryMode bit 15
is set, so they are surfaced as parallel ElectricCharge?/Energy? sets
selected by IsCapacityReportedInEnergyUnits rather than as a single
mistyped quantity. - Per-key RGB is gated to Framework Desktop, which is what upstream
documents; the Framework 16 keyboard is not EC-controlled. - RemapCapsLockToControl hardcodes the Framework 12 matrix position, so
it is documented as model-specific rather than universal.
Interface change: IFrameworkEcConnection gains seven facet properties.
Existing members are untouched, so callers are unaffected, but external
implementers of the interface must add them.
Also update the CLI demo with read-only panels for every new facet,
keeping Smart Battery and the audio card version out of the refresh loop
because both are too expensive to poll, and add 21 hardware tests
covering the new surface plus a hardware-free Port 80 ordering
regression test. 41/41 pass on Framework hardware.