Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] bufferGetAtIndex( ) Question

2012-04-02 by STEVEN HOLDER

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@yahoo.com>
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]

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.