-
Notifications
You must be signed in to change notification settings - Fork 218
Hardware SPI #64
Hardware SPI #64
Conversation
esp32/machine_hspi.h: Adding HW SPI support
esp32/modmachine.h: Updated with machine_hw_spi_type esp32/machine_hw_spi.c: Added machine_hw_spi_type
dpgeorge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the single comment it looks good!
Also, please confirm that all code was your own, or derived from this code base.
esp32/machine_hw_spi.c
Outdated
| // if a port didn't define MSB/LSB constants then provide them | ||
| #ifndef MICROPY_PY_MACHINE_SPI_MSB | ||
| #define MICROPY_PY_MACHINE_SPI_MSB (0) | ||
| #define MICROPY_PY_MACHINE_SPI_LSB (1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be moved to esp32/mpconfigport.h; see stmhal/mpconfigport.h for hints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Will update tomorrow.
esp32/mpconfigport.h: Moved SPI constants to mpconfigport.h
|
Haven't tested the last commit, yet. My ESP32 is at work. |
Yes, all mine; I only looked at the ESP-IDF documentation, and ESP-IDF code examples, and the MicroPython source files. There aren't any licensing issues. |
|
Okay, tested. Should be good to go. |
|
Thank you! Rebased, squashed and merged in 38c6e55. |
With changes as discussed in other PR.
Also, the baudrate worked fine for me, using SPI1 and all native pins.