初始化版本
This commit is contained in:
67
osal/include/osal.h
Normal file
67
osal/include/osal.h
Normal file
@ -0,0 +1,67 @@
|
||||
/*
|
||||
* OSAL (Operating System Abstraction Layer) Main Header
|
||||
*/
|
||||
|
||||
#ifndef __OSAL_H__
|
||||
#define __OSAL_H__
|
||||
|
||||
#include "osal_config.h"
|
||||
#include "osal_def.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* System Control */
|
||||
osal_err_t osal_init(void);
|
||||
osal_err_t osal_start(void);
|
||||
|
||||
/* Error Handling */
|
||||
osal_err_t osal_get_errno(int native_err);
|
||||
|
||||
/* System Service */
|
||||
osal_tick_t osal_tick_get(void);
|
||||
osal_err_t osal_delay(osal_tick_t tick);
|
||||
osal_err_t osal_mdelay(osal_int32_t ms);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Include Modules */
|
||||
|
||||
#if OSAL_USING_THREAD
|
||||
#include "osal_thread.h"
|
||||
#endif
|
||||
|
||||
#if OSAL_USING_SEMAPHORE
|
||||
#include "osal_sem.h"
|
||||
#endif
|
||||
|
||||
#if OSAL_USING_MUTEX
|
||||
#include "osal_mutex.h"
|
||||
#endif
|
||||
|
||||
#if OSAL_USING_EVENT
|
||||
#include "osal_event.h"
|
||||
#endif
|
||||
|
||||
#if OSAL_USING_MESSAGEQUEUE
|
||||
#include "osal_mq.h"
|
||||
#endif
|
||||
|
||||
#if OSAL_USING_TIMER
|
||||
#include "osal_timer.h"
|
||||
#endif
|
||||
|
||||
#if OSAL_USING_HEAP
|
||||
#include "osal_mem.h"
|
||||
#endif
|
||||
|
||||
#include "osal_irq.h"
|
||||
|
||||
#if OSAL_USING_LOG
|
||||
#include "osal_log.h"
|
||||
#endif
|
||||
|
||||
#endif /* __OSAL_H__ */
|
||||
Reference in New Issue
Block a user