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

spi.transfer n number of bytes #24

Open
DevilWAH opened this issue Mar 19, 2017 · 1 comment
Open

spi.transfer n number of bytes #24

DevilWAH opened this issue Mar 19, 2017 · 1 comment

Comments

@DevilWAH
Copy link

would it be possible to be able to set the val to other than 8 or 16? or the ability to write buffer with out the buffer being over written.
I want to send a 32bit variable, but i want to send it multiple times but i don't always know how many times.

So my choices seem to be

  1. save the entire string to a variable and then write it, but if i want to send the same data 1,000 times that a going to eat up the memory

  2. write to spi using 8/16 bit spi.tranfer(val), but then i have to split the 32bit value up and have lots of loops

  3. use the send buffer to send the 32bit value but then i have to rewrite the value back before i send again ( as the buffer gets over written)

It would be nice to simple be able to send an arbturity number of bytes with out having the buffer overwritten.

@PaulStoffregen
Copy link
Owner

This library tries to follow the functions defined by Arduino.

The best place to ask for API extensions is Arduino's github. If Arduino publishes new functions, Teensy will implement them.

Sometimes we create functions not present in Arduino's version, but usually that is not desirable.

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

No branches or pull requests

2 participants