mirror of
https://gitee.com/jiuyilian/embedded-framework.git
synced 2025-01-06 10:16:51 -05:00
Backup.
This commit is contained in:
parent
a9cc7abe6b
commit
99004e8a6f
|
@ -16,6 +16,11 @@
|
|||
#include "ILog.h"
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
StatusCode HalInit(IHal *hal)
|
||||
{
|
||||
LogInfo("Hal init.\n");
|
||||
return CreateStatusCode(STATUS_CODE_OK);
|
||||
}
|
||||
static void HalFree(void *object)
|
||||
{
|
||||
LogInfo("hal instance free.\n");
|
||||
|
@ -27,6 +32,7 @@ void HalImplInit(Hal *hal)
|
|||
{
|
||||
LogInfo("HalImplInit\n");
|
||||
NewIHal((IHal **)&hal);
|
||||
((IHal *)hal)->init = HalInit;
|
||||
((IHal *)hal)->free = HalFree;
|
||||
}
|
||||
StatusCode NewHal(Hal **hal)
|
||||
|
|
|
@ -26,6 +26,7 @@ typedef struct hal
|
|||
} Hal;
|
||||
StatusCode NewHal(Hal **hal);
|
||||
void HalImplInit(Hal *hal);
|
||||
StatusCode HalInit(IHal *hal);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user