View Single Post
  #7   Spotlight this post!  
Unread 29-01-2007, 19:04
buddy.smith buddy.smith is offline
Master Control
FRC #1795
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: atlanta
Posts: 20
buddy.smith is an unknown quantity at this point
Re: Pointers/References?

No worries.

I personally use vim with some nice things for auto-indenting code.

Also, if your functions are so long that they won't fit on one screen, it's a good sign that your function might be too long.

But I've digressed far beyond the initial topic.

If you require more assisstance, I'll be trolling this forum. I'd love to help any other teams that need it....

Another thing you can do, is group the things that will be in your eeprom into a struct:

Code:
struct {
      unsigned char version[4];
      unsigned char foo;
      unsigned char bar;
} gEepromStruct;
Then you can change your eeprom read/write:

[code]
void eeprom_read(void *pData, unsigned char size)
{
/* Read data into pData here */

}

void test( void )
{
eeprom_read( &gEepromStruct, sizeof(gEepromStruct));
}

Now your eeprom read/write are generic, and you can put anything you want in the eeprom without changing that code.

ttyl,

--buddy