Skip to content

Adding cross-library support for DFU#129

Open
humphrey-xmos wants to merge 7 commits intoxmos:developfrom
humphrey-xmos:feature/dfu-support
Open

Adding cross-library support for DFU#129
humphrey-xmos wants to merge 7 commits intoxmos:developfrom
humphrey-xmos:feature/dfu-support

Conversation

@humphrey-xmos
Copy link
Contributor

@humphrey-xmos humphrey-xmos commented Feb 11, 2026

Adds dfu_control_server for lib_device_control interface to lib_dfu
Adds optional header control_default_conf.h and control_default_dfu_conf.h
Replaced CMake device build selection parameters with optional header defines (same as host).

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds cross-library support for Device Firmware Update (DFU) functionality to lib_device_control, enabling integration with lib_dfu. It introduces a new DFU control server that implements the control interface to handle DFU commands over various transport protocols (I2C, USB, SPI, XSCOPE).

Changes:

  • Added dfu_control_server implementation that wraps DFU API calls in the control interface protocol
  • Introduced CONTROL_CMD_VALUE macro to extract command values by clearing the read/write bit
  • Added optional configuration header mechanism for DFU resource ID customization

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
lib_device_control/lib_build_info.cmake Conditionally includes dfu_control_server.xc when CONTROL_APP_DFU is set and declares control_dfu_conf.h as optional header
lib_device_control/inc/dfu_control_server.h Declares the dfu_control_server function that implements the control interface for DFU
lib_device_control/inc/control_transport_shared.h Adds CONTROL_CMD_VALUE macro to extract command value by masking out read/write bit
lib_device_control/inc/control_default_dfu_conf.h Provides default RESOURCE_ID_DFU definition with optional override mechanism
lib_device_control/apps/dfu_control_server.xc Implements DFU control server that translates control interface calls to DFU API requests with custom header handling
lib_device_control/api/control.h Includes control_default_dfu_conf.h to make DFU resource ID available

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants