Go Down

Topic: frame size on shiftout (Read 1 time) previous topic - next topic

paulb

Quote
But it would add another parameter to the function, that has to be documented and explained.


How about optional parameter with default being byte. Such as C++ style optional param on random.


Quote
Since ints and ints are so different nowadays (2bytes - 8 bytes long)


Arduino ints aren't going to change anytime soon. I wouldn't argue for 8 bits not being default.


Quote
Odd frame sizes is only a tiny edit to the code and is rare so I dont see any point to building it in.
Anyone requiring it can easily do it.


Most users aren't going to want to fuss with "wiring.c" or have to copy and paste function contents. As I said earlier it would help out beginners avoid the low-byte / highbyte fuss of outputting ints. Such as when using 16 bit driver chips :)

More flexibility == easy-to-use microC platform.  One might mistake this slogan as an add for the Basic Stamp.

These are trivial fixes which collectively help round out rough edges in the language.




mellis

It seems reasonable to add another parameters that specifies the number of bits - probably defaulting to 8.  Paul, do you want to email the developers list with the suggestion?  I'd like to discuss these kinds of changes there before incorporating them into the code.

follower

Quote
I think a library for Hardware-SPI would be a good idea, and should not be to difficult to create.

xSmurf has been working on a Hardware-SPI library, not sure where it's at currently.

--Phil.

Go Up