Skip to content

Commit b8a999c

Browse files
./tests: Move PSOC specific variables from spi test to test_config.
Signed-off-by: Ramya Subramanyam <ramya.subramanyam@infineon.com>
1 parent e854708 commit b8a999c

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

tests/test_config.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @file test_config.cpp
3+
* @brief Implementation file for board-specific test configuration variables.
4+
*
5+
*/
6+
7+
#include "test_config.h"
8+
#include <SPI.h>
9+
10+
// Define the SPI master and slave instances
11+
SPIClassPSOC SPI1 = SPIClassPSOC(PIN_SPI_MOSI, PIN_SPI_MISO, PIN_SPI_SCK, TEST_PIN_SPI_SSEL, true);
12+

tests/test_config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#define TEST_CONFIG_H
1212

1313
#include <stdint.h>
14+
#include <SPI.h>
1415

1516
// Test Pin Definitions
1617

@@ -28,4 +29,7 @@
2829

2930
#define TEST_ADC_RESOLUTION 2048 // 11-bit resolution
3031

32+
// Forward declarations for SPI instances
33+
extern SPIClassPSOC SPI1;
34+
3135
#endif // TEST_CONFIG_H

0 commit comments

Comments
 (0)