On Fri, Mar 06, 2009 at 10:57:03AM -0500, subscriptions@aeolusdevelopment.com wrote:
>
> Assuming you are sending the long out as binary, something like the
> following is what I would use (serial_out is left out, I'm assuming
> the HW control you have a handle on)
>
> void put_bytes( unsigned char * const buf, int num)
> {
> int i;
>
> for( i=0; i < num; i++){
> serial_out( *buf);
> buf++;
> }
> }
Benchmark that against the same using index logic rather than pointers.
The last compiler I used that generated faster/smaller code with
pointers was for the 68k.
--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.Message
Re: [AVR-Chat] Array of Long
2009-03-06 by David Kelly
Attachments
- No local attachments were found for this message.