[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] Data Array alignment
From: |
Trampas |
Subject: |
RE: [avr-gcc-list] Data Array alignment |
Date: |
Mon, 5 Jun 2006 08:19:04 -0400 |
Please not the error and that
UINT8 Data[BUFF_SIZE];
Should be
UINT8 Data[BUFF_SIZE+1];
Trampas
-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Trampas
Sent: Sunday, June 04, 2006 7:42 PM
To: address@hidden
Subject: [avr-gcc-list] Data Array alignment
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
_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Re: [avr-gcc-list] Data Array alignment, Ned Konz, 2006/06/05
Re: [avr-gcc-list] Data Array alignment, Dmitry K., 2006/06/05