Skip to content

apps/examples: Add path option to SPI Slave test#3467

Open
eren-terzioglu wants to merge 1 commit intoapache:masterfrom
eren-terzioglu:feature/add_spislv_path_option
Open

apps/examples: Add path option to SPI Slave test#3467
eren-terzioglu wants to merge 1 commit intoapache:masterfrom
eren-terzioglu:feature/add_spislv_path_option

Conversation

@eren-terzioglu
Copy link
Copy Markdown
Contributor

Summary

  • apps/examples: Add path option to SPI Slave test

Add path option to spislv_test example

Impact

Impact on user: Yes. Users can test different SPI slave interface just changing command
Impact on build: No.
Impact on hardware: No.
Impact on documentation: No.
Impact on security: No.
Impact on compatibility: No.

Testing

esp32c6-devkitc:spislv config used.

Building

Command to build:

make -j distclean && ./tools/configure.sh esp32c6-devkitc:spislv && make -j && make download ESPTOOL_PORT=/dev/ttyUSB0

Running

spislv -p /dev/spislv0 -x 2 abba and spislv -p /dev/spislv2 -x 2 abba commands used to test

Output

Here is the output

nsh> spislv -p /dev/spislv0 -x 2 abba
Error: Failed to open /dev/spislv0: No such file or directory
nsh> spislv -p /dev/spislv2 -x 2 abba
Slave: Queuing 2 bytes for sending to master: AB BA 

Add path option to spislv_test example

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
#define RX_BUFFER_SIZE 64
#define TX_BUFFER_SIZE 64
#define SOURCE_FILE "dev/spislv2" /* SPI device path */
#define DEFAULT_SPI_PATH "dev/spislv2"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@eren-terzioglu why is it spislv2 instead of spislv0 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants