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 "ILog.h"
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
StatusCode HalInit(IHal *hal)
|
||||||
|
{
|
||||||
|
LogInfo("Hal init.\n");
|
||||||
|
return CreateStatusCode(STATUS_CODE_OK);
|
||||||
|
}
|
||||||
static void HalFree(void *object)
|
static void HalFree(void *object)
|
||||||
{
|
{
|
||||||
LogInfo("hal instance free.\n");
|
LogInfo("hal instance free.\n");
|
||||||
|
@ -27,6 +32,7 @@ void HalImplInit(Hal *hal)
|
||||||
{
|
{
|
||||||
LogInfo("HalImplInit\n");
|
LogInfo("HalImplInit\n");
|
||||||
NewIHal((IHal **)&hal);
|
NewIHal((IHal **)&hal);
|
||||||
|
((IHal *)hal)->init = HalInit;
|
||||||
((IHal *)hal)->free = HalFree;
|
((IHal *)hal)->free = HalFree;
|
||||||
}
|
}
|
||||||
StatusCode NewHal(Hal **hal)
|
StatusCode NewHal(Hal **hal)
|
||||||
|
|
|
@ -26,6 +26,7 @@ typedef struct hal
|
||||||
} Hal;
|
} Hal;
|
||||||
StatusCode NewHal(Hal **hal);
|
StatusCode NewHal(Hal **hal);
|
||||||
void HalImplInit(Hal *hal);
|
void HalImplInit(Hal *hal);
|
||||||
|
StatusCode HalInit(IHal *hal);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user