[Icc-avr] Pointer Problem
Michael Dipperstein
MDipperstein at CalAmp.com
Wed May 2 14:38:47 PDT 2007
Probably
if (Pointer > &DMXBuffer[MAX_DMX - 1])
-----Original Message-----
From: icc-avr-bounces at imagecraft.com
[mailto:icc-avr-bounces at imagecraft.com] On Behalf Of Albert van Veen
Sent: Wednesday, May 02, 2007 1:28 PM
To: Discussion list for ICCAVR and ICCtiny Users. You do NOT
needtosubscribeto icc-announce if you are a member of this.
Subject: RE: [Icc-avr] Pointer Problem
Surely you mean:
if (Pointer > &DMXBuffer[MAX_DMX])
Albert.
-----Original Message-----
From: Sylvain Bissonnette [mailto:sbissonnette at microsyl.com]
Sent: Thursday, 3 May 2007 6:18 a.m.
To: Discussion list for ICCAVR and ICCtiny Users. You do NOT
needtosubscribetoicc-announce if you are a member of this.
Subject: Re: [Icc-avr] Pointer Problem
Hi,
First thanks for your help, I'm not too fare from the solution,
It's
look like my buffer transmitter don't work.
typedef struct
{
ushort Red;
ushort Green;
ushort Blue;
}LedStruct;
LedStruct *Led;
// DMX
ushort DMXBuffer[MAX_DMX];
void main()
{
Led = (LedStruct*)&DMXBuffer[0];
}
#pragma interrupt_handler DMXSendByte:15
void DMXSendByte(void)
{
static ushort *Pointer;
if (Pointer > &DMXBuffer[0]) Pointer = &DMXBuffer[0];
else UDR = *Pointer++;
}
Thanks for your usfull help
Sylvain Bissonnette
_______________________________________________
Icc-avr mailing list
Icc-avr at imagecraft.com
http://dragonsgate.net/mailman/listinfo/icc-avr
_______________________________________________
Icc-avr mailing list
Icc-avr at imagecraft.com
http://dragonsgate.net/mailman/listinfo/icc-avr
More information about the Icc-avr
mailing list