-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add max3421e host driver #2251
Add max3421e host driver #2251
Conversation
- add empty tuh_int_handler/tud_int_handler if corresponidng stack not enabled - add hcd_template.c
- rename max3421e to max3421 - fix incorrect bitmask for HCTL, fix initial device connect - fix bus reset cause connect IRQ
- merge addr0 ep to pool - add control status to xact in/out - use atomic flag busy to ensure only 1 transfer is active at any time - execute pending transfer after one is complete (or clear busy flag) - change rtt mode to block if full
- hcd_int_disable/enable is software only to reduce interrupt lag
- xact_inout() to support send setup
…e when CONDETIRQ occurs but we are disabled interrupt (for osal queue access).
…still hanged occasionally.
- also add usbh_defer_func()
…iver, 'MAX3421_HOST=1' must be added as part of make/cmake command
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.
How can we dynamically initialize this? In CP, we'll want the code but not the data structures until we know we need it. Maybe a struct with all needed buffers/data and function pointers to the SPI API?
For now, you need to enable the host driver with The driver requires 3 api implmented by application void tuh_max3421_spi_cs_api(uint8_t rhport, bool active);
bool tuh_max3421_spi_xfer_api(uint8_t rhport, uint8_t const * tx_buf, size_t tx_len, uint8_t * rx_buf, size_t rx_len);
void tuh_max3421_int_api(uint8_t rhport, bool enabled); |
Describe the PR
MAX3421_HOST=1
must be added to makefile and cmake build command e.gTODO: more ports to be tested with later on: esp32