forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ports/psoc6: SPI refactoring and tests.
Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
- Loading branch information
1 parent
ab0d607
commit 41179fe
Showing
5 changed files
with
71 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
*** SPI MASTER INSTANCE *** | ||
|
||
*** Half duplex communication *** | ||
|
||
Test Case 1: master-->write and slave-->read | ||
Master wrote (tx): b'\x08\x06\x04\x02\x07\x05\x03\x01' | ||
Slave returned (rx): b'\x08\x06\x04\x02\x07\x05\x03\x01' | ||
Test case successful : True | ||
|
||
Test Case 2: slave-->write and master-->read using readinto() | ||
Slave wrote (rx): bytearray(b'\x01\x03\x05\x07\x02\x04\x06\x08') | ||
Master expects (exp): b'\x01\x03\x05\x07\x02\x04\x06\x08' | ||
Test case successful : True | ||
|
||
Test Case 3: slave-->write and master-->read using readinto by sending out a write_byte=5 | ||
Slave wrote (rx): bytearray(b'\x08\x06\x04\x02\x08\x06\x04\x02') | ||
Master expects (exp): b'\x08\x06\x04\x02\x08\x06\x04\x02' | ||
Test case successful : True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters