diff --git a/khdf/liteos_m/core/common/src/devmgr_service_start.c b/khdf/liteos_m/core/common/src/devmgr_service_start.c index 0cea250b3395eced8b8adb51efb765b52c372369..be9270d043e6ea27a7514d528f207df218161ada 100644 --- a/khdf/liteos_m/core/common/src/devmgr_service_start.c +++ b/khdf/liteos_m/core/common/src/devmgr_service_start.c @@ -125,4 +125,3 @@ int DeviceManagerStartStep2() struct DevmgrService *devMgrSvc = (struct DevmgrService *)DevmgrServiceGetInstance(); return DevmgrServiceLoadLeftDriver(devMgrSvc); } - diff --git a/khdf/liteos_m/osal/BUILD.gn b/khdf/liteos_m/osal/BUILD.gn index 30b69dda24965641b8002a6ad5614b266f8b0167..a4e8d26cc97b9c138df19539f3c643898e9e1301 100644 --- a/khdf/liteos_m/osal/BUILD.gn +++ b/khdf/liteos_m/osal/BUILD.gn @@ -38,6 +38,9 @@ config("libhdf_osal_pub_config") { "//drivers/framework/include/utils", "//kernel/liteos_m/kernel/arch/include", "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", + "//kernel/liteos_m/components/bounds_checking_function/include", + "//kernel/liteos_m/kernel/include", + "//kernel/liteos_m/utils/", ] } @@ -55,4 +58,4 @@ static_library("hdf_osal_lite") { public_configs = [ ":libhdf_osal_pub_config", ] -} \ No newline at end of file +} diff --git a/khdf/liteos_m/osal/include/osal_atomic_def.h b/khdf/liteos_m/osal/include/osal_atomic_def.h index d8b940b85961b23bf75ad8f1735693d5069a344e..4b137eb796e9045ae79fac49bda3a88288bd5561 100644 --- a/khdf/liteos_m/osal/include/osal_atomic_def.h +++ b/khdf/liteos_m/osal/include/osal_atomic_def.h @@ -32,6 +32,7 @@ #define OSAL_ATOMIC_DEF_H #include +#include "hdf_base.h" #ifdef __cplusplus extern "C" { diff --git a/khdf/liteos_m/osal/src/osal_timer.c b/khdf/liteos_m/osal/src/osal_timer.c index 6edec851ac8f7a209734ed7ef73077b253732634..dd528e4fbba7646215d3bfddb254da1fb29adb46 100644 --- a/khdf/liteos_m/osal/src/osal_timer.c +++ b/khdf/liteos_m/osal/src/osal_timer.c @@ -69,46 +69,6 @@ int32_t OsalTimerCreate(OsalTimer *timer, uint32_t interval, OsalTimerFunc func, return HDF_SUCCESS; } -static int32_t OsalStartTimer(OsalTimer *timer, UINT8 mode) -{ - uint32_t ret; - uint32_t intSave; - uint32_t interval; - uint16_t timerID = 0; - struct OsalLitetimer *liteTimer = NULL; - - if (timer == NULL || timer->realTimer == NULL) { - HDF_LOGE("%s invalid para %d", __func__, __LINE__); - return HDF_ERR_INVALID_PARAM; - } - - liteTimer = (struct OsalLitetimer *)timer->realTimer; - if (liteTimer->interval == 0 || liteTimer->func == NULL) { - HDF_LOGE("%s invalid para %d", __func__, __LINE__); - return HDF_ERR_INVALID_PARAM; - } - - interval = liteTimer->interval; - intSave = LOS_IntLock(); - ret = LOS_SwtmrCreate(LOS_MS2Tick(interval), mode, (SWTMR_PROC_FUNC)liteTimer->func, &timerID, liteTimer->arg); - if (ret != LOS_OK) { - LOS_IntRestore(intSave); - HDF_LOGE("%s LOS_SwtmrCreate fail %u", __func__, ret); - return HDF_FAILURE; - } - - ret = LOS_SwtmrStart(timerID); - if (ret != LOS_OK) { - LOS_SwtmrDelete(timerID); - LOS_IntRestore(intSave); - HDF_LOGE("%s LOS_SwtmrStart fail %u", __func__, ret); - return HDF_FAILURE; - } - LOS_IntRestore(intSave); - - liteTimer->timerID = timerID; - return HDF_SUCCESS; -} int32_t OsalTimerStartLoop(OsalTimer *timer) { return OsalStartTimer(timer, LOS_SWTMR_MODE_PERIOD); diff --git a/khdf/liteos_m/test/sample_driver/BUILD.gn b/khdf/liteos_m/test/sample_driver/BUILD.gn index 13db1c4742246a9fc51811d0e9868029ebc05fc1..a88e5efa394e66bfe73d6ffe7e59c66c5ae1ef60 100644 --- a/khdf/liteos_m/test/sample_driver/BUILD.gn +++ b/khdf/liteos_m/test/sample_driver/BUILD.gn @@ -39,9 +39,10 @@ static_library("sample_driver") { deps = [ "$khdf_path/osal:hdf_osal_lite", + "$khdf_path/core:hdf_core", ] ldflags = [ "-Wl,--whole-archive" ] -} \ No newline at end of file +}