avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Data Array alignment


From: Trampas
Subject: [avr-gcc-list] Data Array alignment
Date: Sun, 4 Jun 2006 19:42:23 -0400

Ok, I know somewhere there is a manual where this information exists, but I
have not found it. 

I am using a buffer in an ISR 

#define BUFF_SIZE 0x1F
UINT8 Data[BUFF_SIZE];
volatile UINT8 Read;
volatile UINT8 Write;

ISR(xxx)
{
        //OK to over write if not read in time
        Data[Write++]=mydata;
        Write=Write & BUFF_SIZE; 
}

Void Data_Sink()
{
        If (Read!=Write)
        {
                Mydata=Data[Read++];
                Read=Read & BUFF_SIZE;
        }
}

I was wondering if someone had a clever way of speeding this up, by maybe
aligning the data buffer in memory and using pointers? 

Trampas







reply via email to

[Prev in Thread] Current Thread [Next in Thread]