Altera_Forum
Honored Contributor
15 years agomacro for detecting OS presence
Hi,
I am writing a driver for my 1-wire (onewire) master RTL, and I would like to write the driver so that it would with or without the OS. But the ISR implementation depends on the availability of flags and semaphores. Is there a macro I could check to switch between two ISR implementations, something like:# ifdef UCOSII
// ISR implementation using flags and semaphores# else
// ISR implementation using global volatile variables and polling# endif
Regards, Iztok Jeras