Skip to content

Makefile: src/corelibs/spi: Remove PSOC specific class name from test… #62

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ramya-subramanyam
Copy link
Collaborator

…suite.

By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---

We previously used project-specific class names "SPIClassPSOC" in SPI tests to create slave and master instances. This has now been moved to a test_config source file to enhance its generic nature and reusability across different projects.

Infineon/arduino-core-psoc6#148

Copy link

@Copilot 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 removes PSOC-specific class names from SPI test files to make them more generic and reusable across different projects. The changes replace hardcoded SPIClassPSOC instantiations with references to externally defined SPI instances from a test configuration file.

  • Removes hardcoded PSOC-specific SPI class instantiations from test files
  • Adds test_config.h include to access generic SPI instance definitions
  • Updates Makefile to copy all test_config.* files instead of just the header

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
test_spi_connected2_slavepingpong.cpp Removes hardcoded SPIClassPSOC slave instance definition and adds test_config.h include
test_spi_connected2_masterpingpong.cpp Removes hardcoded SPIClassPSOC master instance definition and adds test_config.h include
test_spi_connected1_loopback.cpp Replaces local SPI instance with spi_master reference from test_config
Makefile Updates file copy pattern to include all test_config files
Comments suppressed due to low confidence (3)

src/corelibs/spi/test_spi_connected2_masterpingpong.cpp:25

  • The spi_master variable declaration is removed but the variable is still being used in the loopback test file. This suggests that spi_master should now be defined in test_config.h or there's an inconsistency in the refactoring.
// variables

src/corelibs/spi/test_spi_connected2_masterpingpong.cpp:33

  • The assignment to spi_master is removed, but spi_master is still being used in other test files. This initialization should either be moved to test_config.h or the variable should be properly initialized elsewhere.
    pinMode(TEST_PIN_SYNC_IO, OUTPUT);

Copy link
Collaborator

@LinjingZhang LinjingZhang left a comment

Choose a reason for hiding this comment

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

Thanks!

@jaenrig-ifx
Copy link
Member

I would expect that SPI and SPI1 would be available, and/or SPIClass to be used in the case of pointers.

@LinjingZhang LinjingZhang self-requested a review August 5, 2025 07:57
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.

3 participants