Skip to content

Fix compatibility with ZMK PR #3145 and #3140#21

Open
mike1808 wants to merge 3 commits intocarrefinho:feat/new-status-screensfrom
mike1808:fix/new-status-screan-zmk-refactor
Open

Fix compatibility with ZMK PR #3145 and #3140#21
mike1808 wants to merge 3 commits intocarrefinho:feat/new-status-screensfrom
mike1808:fix/new-status-screan-zmk-refactor

Conversation

@mike1808
Copy link

@mike1808 mike1808 commented Feb 16, 2026

Fix compatibility with ZMK PR #3145 and #3140

Fixes #20

Summary

This PR updates the prospector-zmk-module to be compatible with recent changes in ZMK's main branch:

  • ZMK PR #3145: Refactored board definitions to use proper HWMv2 board extensions
  • ZMK PR #3140: Renamed endpoint selection API

Problem

After ZMK PR #3145 was merged, building the dongle (and other keyboards using xiao_ble with prospector_adapter) failed with:

error: 'ZMK_SPLIT_BLE_PERIPHERAL_COUNT' undeclared here (not in a function)

Additionally, ZMK PR #3140 renamed the endpoint API from zmk_endpoints_selected() to zmk_endpoint_get_selected(), causing compilation errors in the status screen output code.

Root Cause

  1. PR #3145: ZMK now uses board variants (e.g., xiao_ble//zmk) for ZMK-specific configurations. The vanilla xiao_ble board no longer includes Bluetooth support by default, which meant CONFIG_ZMK_SPLIT_BLE was not enabled, leaving ZMK_SPLIT_BLE_PERIPHERAL_COUNT undefined.

  2. PR #3140: The endpoint selection API was renamed as part of API cleanup.

Changes

Code Changes

  1. Rename xiao_ble_zmk.overlay (boards/shields/prospector_adapter/boards/xiao_ble_zmk.overlay)

  2. Update endpoint API calls (all src/layouts/*/output.c files)

    • Replaced zmk_endpoints_selected() with zmk_endpoint_get_selected()
    • Affects Classic, Field, Operator, and Radii layouts

Documentation Changes

  1. Update README.md
    • Changed example from board: xiao_ble to board: xiao_ble//zmk
    • Added note explaining the requirement for ZMK board variants

Testing

  • ✅ Dongle builds successfully with xiao_ble//zmk board variant
  • ✅ Firmware compiles without errors (979KB output)
  • ✅ All status screen layouts updated with new API

Migration Guide

Users need to update their build.yaml:

Before:

- board: xiao_ble
  shield: your_dongle prospector_adapter

After:

- board: xiao_ble//zmk
  shield: your_dongle prospector_adapter

Compatibility

  • ✅ Compatible with ZMK main branch (post PR #3145 and #3140)
  • ✅ Requires Zephyr 4.1
  • ⚠️ Breaking change: Requires xiao_ble//zmk board variant

Related

mike1808 and others added 3 commits February 15, 2026 22:28
Add support for xiao_ble//zmk board variant and update endpoint API calls.

Changes:
- Add xiao_ble_zmk.overlay for ZMK board variant support (PR #3145)
- Replace zmk_endpoints_selected() with zmk_endpoint_get_selected() (PR #3140)

Fixes carrefinho#20

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add note about ZMK HWMv2 board variant requirement for proper Bluetooth support.

Related to carrefinho#20

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant