[splint-discuss] SFR definition acceptable to SPLINT
Ludolf Holzheid
lholzheid at bihl-wiedemann.de
Tue Aug 21 12:41:33 EDT 2007
On Tue, 2007-08-21 12:41:42 -0300, juan abba wrote:
> [..]
> I am trying to find a way to use following
>
> #if defined S_SPLINT_S
> #define PCADDR char *unsigned char *
> #else
> #define PCADDR (*(unsigned char volatile far*)0xFD8) //
> Port C Address
> #endif
Hello Juan,
I don't understand the definition you made for splint.
The definition for the Zilog compiler says something like 'take 0xFD8
as an address of an unsigned char variable and access this variable'.
So, I think, the symbol 'PCADDR' is to be used e.g. as follows:
PCADDR = 0x03;
or
if (0x00 != (PCADDR & 0x04))
{
...
}
Why don't you declare an unsigned char named 'PCADDR' to make splint
happy?
# if defined S_SPLINT_S
extern unsigned char PCADDR;
# else
# define PCADDR (*(unsigned char volatile far*)0xFD8)
# endif
HTH,
Ludolf
--
---------------------------------------------------------------
Ludolf Holzheid Tel: +49 621 339960
Bihl+Wiedemann GmbH Fax: +49 621 3392239
Floßwörthstraße 41 e-mail: lholzheid at bihl-wiedemann.de
D-68199 Mannheim, Germany
---------------------------------------------------------------
More information about the splint-discuss
mailing list