I'm attempting to create some sort of code superstructure in an (embedded) C context, which would allow me to swap in and out underlying implementations of the code itself while preserving a certain defined interface. I'm not sure how best to describe what I'm trying to, so I'll instead put up a small example:

interface.h:

```
(#pragma once or other include guard scheme)

/**
 * 'Standard' include file, implementation 
 * independent. Mostly contains
 * Declarations, specifying function name, 
 * return values, parameters, types, etc. 
 */
static void do_something(void); 
static void do_something_else(void); 

//Subsequently includes the actual header for the 
//specific implementation to be used

#include "implementation.h"

```

implementation.h:

```
(#pragma once or other include guard scheme)

/**
 * Include file, implementation specific.
 * Mostly contains implementation specific 
 * defines. The function prototypes are 
 * obtained from the interface.h include.
 * However, some implementations need to be
 * static inline for performance issues, and 
 * are defined here.
 */
static inline void do_something(void) {
    implementation_of_something;
}

```

implementation.c:

```
#include "interface.h"
#include "implementation.h"

/**
 * Actual implementations of the rest of the 
 * functions.
 */
static void do_something_else(void) {
    implementation_of_something_else;
}

```

And finally, user.c:

```
#include interface.h

int main(void){    
   do_something();
   do_something_else();
}

```

The desired outcome is that when main.c is compiled and the executable is linked, the `do_something()` call gets inlined into `main()`, while `do_something_else()` results in implementation.o being linked in and a function call taking place.

Largely, this seems to work. 

My questions, though, are the following:

* Is this an acceptable way of doing things? Is there a better way to be doing this? Any other more appropriate pattern?
* The function prototypes are different in different places. Specifically for the case of `do_something()`, which in one case is `static void` and the other is `static inline void`. `Doxygen` certainly seems to have some issue with this, I'm not sure if the compiler does. Does it have any consequences? Is there a way to avoid this?

EDIT: Supplementary questions:

* How would the compiler behave if it found the following in a translation unit:

Case 1:

```
extern void function(void);                (from interface.h)
static inline void function(void){         (from implementation.h)
        function_body;
}

function();                                (from user.c) 

```