ROB LUND

static storage class missing in stdtypes.h

Discussion created by ROB LUND on Feb 27, 2008
Latest reply on Mar 3, 2008 by Daniel Lundin
Hey everyone.  I've been fighting a bug in my RS232 code the last couple days and finally realized that I had a function return declared as "Byte", which is declared as unsigned char in the stdtypes.h.  My MCU is the MC9S08QG8.

This function returned two bytes in an array, but I noticed that the second byte kept getting trashed in RAM.  What I really needed was a static char so that the RAM would be reserved for that array.

I'm a little surprised there's not a static definition in the stdtypes header file.

Outcomes