Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Other): Enable USB support for Zephyr by adding MAXUSB #1299

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

hfakkiz
Copy link
Contributor

@hfakkiz hfakkiz commented Dec 16, 2024

Description

The purpose of this PR is enabling USB support for MAX32 MCUs on Zephyr RTOS.

  • Added required MAXUSB files into 'hal_adi' repository by updating CI workflow.
  • Added these files into Zephyr source and include directories.
  • Handled differences between MSDK and Zephyr with "USE_ZEPHYR_USB_STACK" flag and solved warning problem and race condition situation.

Checklist Before Requesting Review

  • PR Title follows correct guidelines.
  • Description of changes and all other relevant information.
  • (Optional) Link any related GitHub issues using a keyword
  • (Optional) Provide info on any relevant functional testing/validation. For API changes or significant features, this is not optional.

This commit adds some of MAXUSB files to hal_adi to enable USB
support for Zephyr.
Zephyr has its own USB stack because of that not included stack related
files only included core related files to hal_adi.

Signed-off-by: Furkan Akkiz <[email protected]>
This commit adds some parts of MAXUSB library to Zephyr directories
if Zephyr USB stack is used.

Signed-off-by: Furkan Akkiz <[email protected]>
This commit adds 'USE_ZEPHYR_USB_STACK' flag to handle differences
between MSDK USB and Zephyr USB.

Disabled given line in 'usb.c' file with using 'USE_ZEPHYR_USB_STACK'
flag for Zephyr USB stack because this line causes a race condition for
Zephyr USB. I added this line to 'udc_max32.c' file of Zephyr repo
to handle race condition problem.

Disabled given line in 'usb_protocol.h' file because this line causes a
'redefined' warning for Zephyr USB stack.

Signed-off-by: Furkan Akkiz <[email protected]>
@github-actions github-actions bot added Workflow Related to Workflow development Zephyr MSDK Zephyr related change. labels Dec 16, 2024
@sihyung-maxim sihyung-maxim merged commit 1b95c3c into main Dec 16, 2024
13 checks passed
@sihyung-maxim sihyung-maxim deleted the add-MAXUSB-to-Zephyr branch December 16, 2024 22:58
sihyung-maxim pushed a commit to analogdevicesinc/hal_adi that referenced this pull request Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Workflow Related to Workflow development Zephyr MSDK Zephyr related change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants