SPI - sending multiple bytes

Moderator: Benj

Post Reply
User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times
Contact:

SPI - sending multiple bytes

Post by Jay Dee »

Hi,
I think I remember hearing of the SPI component was getting an overhaul at some point...if not I would love to see in a future release.
Ability to enter strings of bytes to be sent sequentially over the SPI, ability to send this data formated as Dec, Bin or Hex. i.e.
SPI_Send_MultipleBytes 0xFF00FF
or is this just expanding what is acceptable to the current SPI_Send_String function?
J.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: SPI - sending multiple bytes

Post by Benj »

Hello,

We have added string sending and reception to some components for v6 and the SPI would certainly benefit from this added functionality. I think more functions to allow strings of hex data would also be very handy. I will have a think on the best way to achieve it. The cleanest way is to have a sendstring function and then in this you check to see if the first characters are equal to 0x. As the sendstring did not already exist this would not be too bad until you remember that the UART would be good to work in the same way and this already has a sendstring function so adding more code here may be unaceptable as it may cause an existing program to fail compilation due to lack of ROM etc.

I'll have a think on it but thanks for the suggestion.

Post Reply