#ifndef I_HAL_H #define I_HAL_H #include "StatusCode.h" #ifdef __cplusplus extern "C" { #endif typedef struct i_hal IHal; typedef struct i_hal { StatusCode (*init)(IHal *); void (*free)(IHal *); StatusCode (*un_init)(IHal *); } IHal; IHal *GetHalIntance(void); StatusCode NewIHal(IHal **object); void ResetHalImpl(IHal *impl); static inline StatusCode IHalInit(void) { return GetHalIntance()->init(GetHalIntance()); } static inline StatusCode IHalUnInit(void) { return GetHalIntance()->un_init(GetHalIntance()); } StatusCode create_hal_module(void); StatusCode destroy_hal_module(void); #ifdef __cplusplus } #endif #endif