Steven, You are correct. I don't know why but I had it in my head that uartRxBuffer was an array.... Thank you! --- In AVR-Chat@yahoogroups.com, STEVEN HOLDER <s.holder123@...> wrote: > > Isn't the first argument a pointer to a type of cbuffer so should be > Â > UART_Buffer[count] = bufferGetAtIndex(&uartRxBuffer,1); > > What version of GCC are you using ? > Â > Regards > > > ________________________________ > From: englsprogeny1 <englsprogeny1@...> > To: AVR-Chat@yahoogroups.com > Sent: Monday, 2 April 2012, 3:52 > Subject: [AVR-Chat] bufferGetAtIndex( ) Question > > > Â > > AVR GCC > Atmega8 > Using: Procyon AVRlib > > In an attempt to look into the UART_Rx buffer > I make the following call: > > UART_Buffer[count] = bufferGetAtIndex(uartRxBuffer,1); > > I get the following Error: > error: incompatible type for argument 1 of 'bufferGetAtIndex' > > ----------------------------------------------------- > Looking at buffer.h: > > //! get a byte at the specified index in the buffer (kind of like array access) > // note: this does not remove the byte that was read from the buffer > unsigned char bufferGetAtIndex(cBuffer* buffer, unsigned short index); > > -------------------------------- > from uart.c: > // receive and transmit buffers > cBuffer uartRxBuffer; ///< uart receive > cBuffer uartTxBuffer; ///< uart transmit > > _____________________________________________________ > > I don't understand what is wrong with: uartRxBuffer (as it is type:cBuffer ) > > Any ideas? > > Thanks! > > > > > [Non-text portions of this message have been removed] >
Message
Re: bufferGetAtIndex( ) Question
2012-04-02 by englsprogeny1
Attachments
- No local attachments were found for this message.