Skip to content
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 jshSPISendMany #1887

Merged
merged 3 commits into from Jul 17, 2020
Merged

add jshSPISendMany #1887

merged 3 commits into from Jul 17, 2020

Conversation

atc1441
Copy link
Contributor

@atc1441 atc1441 commented Jul 16, 2020

only tx supported for now and no callback, Max 256 byte per request

this improves the sending of SPI data.

only tx supported for now and no callback, Max 256 byte per request
@gfwilliams
Copy link
Member

Thanks, this looks good - do you think you'll be able to get RX and >256 byte done any time soon?

Personally I'm not sure I should merge this right now as it'll break SPI for anyone that's trying to receive data as well. You could always copy the 'weak' jshSPISendMany implementation from jshardwarecommon.c and then use that if there's an RX buffer or >256 bytes?

@gfwilliams gfwilliams mentioned this pull request Jul 16, 2020
@atc1441
Copy link
Contributor Author

atc1441 commented Jul 16, 2020

The new changes should now enable RX and up to 4096 bytes on TX.

I also tested the Callback but that did brake the sending of the new byte because of the way it handles the sending. and the end of the sending.

@gfwilliams
Copy link
Member

Looks great - thanks! Do you think you could just do

jshSPIWait(device);
if (callback) callback();

at the end?

That way even though sending in the background doesn't work, it doesn't matter. It'll just send in the foreground and call the callback when done? Then it doesn't break anything.

@atc1441
Copy link
Contributor Author

atc1441 commented Jul 16, 2020

Good idea

@gfwilliams
Copy link
Member

Great! Are you happy that this is good to go? It looks fine to me. @MaBecker ?

@MaBecker
Copy link
Contributor

Yes good to go, because it is already in use locally with a generic tft lcd unbuffered spi display driver started in #1884.

@gfwilliams gfwilliams merged commit 1707b6d into espruino:master Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants