E
Erik Cato
Hi group!
I'm trying to create at strategy for writing software modules.
I'm writing code for embedded systems but this is not significant for
the solution.
What I'm trying to do is construct software modules that I can use
in several projects. I want the modules to be the same even if the
underlaying hardware change. What I was thinking of doing is to make
functions for talking to the hardware, like GetIO or SetIO and things
like that. I think you get the idea. But the problem is that i need
to include a header file with the function prototypes and the functions
need to be different if the hardware interface is different. Like if
i have a Motorola processor i need to call a Motorola GetIO() and
if i have Atmel MCU i need to call a Atmel GetIO(). But I still wouldn't
like to chang my software module!
Is this doable? If so, what is the best approach?
/Erik
I'm trying to create at strategy for writing software modules.
I'm writing code for embedded systems but this is not significant for
the solution.
What I'm trying to do is construct software modules that I can use
in several projects. I want the modules to be the same even if the
underlaying hardware change. What I was thinking of doing is to make
functions for talking to the hardware, like GetIO or SetIO and things
like that. I think you get the idea. But the problem is that i need
to include a header file with the function prototypes and the functions
need to be different if the hardware interface is different. Like if
i have a Motorola processor i need to call a Motorola GetIO() and
if i have Atmel MCU i need to call a Atmel GetIO(). But I still wouldn't
like to chang my software module!
Is this doable? If so, what is the best approach?
/Erik