#ifndef I_HAL_H #define I_HAL_H #include "ReturnCode.h" /* ** Make sure we can call this stuff from C++. */ #ifdef __cplusplus extern "C" { #endif typedef struct i_hal IHal; typedef struct i_hal { RETURN_CODE_C (*init)(IHal *); void (*free)(IHal *); RETURN_CODE_C (*un_init)(IHal *); } IHal; IHal *GetHalIntance(void); RETURN_CODE_C NewIHal(IHal **object); void ResetHalImpl(IHal *impl); static inline RETURN_CODE_C IHalInit(void) { return GetHalIntance()->init(GetHalIntance()); } static inline RETURN_CODE_C IHalUnInit(void) { return GetHalIntance()->un_init(GetHalIntance()); } RETURN_CODE_C create_hal_module(void); RETURN_CODE_C destroy_hal_module(void); #ifdef __cplusplus } #endif #endif