WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
osal_event

函数

int osal_event_init (osal_event *event_obj)
 Initialize an event control block.
 
int osal_event_write (osal_event *event_obj, unsigned int mask)
 Write an event.
 
int osal_event_read (osal_event *event_obj, unsigned int mask, unsigned int timeout_ms, unsigned int mode)
 Read an event.
 
int osal_event_clear (osal_event *event_obj, unsigned int mask)
 Clear the event occurring in a specified task.
 
int osal_event_destroy (osal_event *event_obj)
 Destroy a event.
 

详细描述

函数说明

◆ osal_event_clear()

int osal_event_clear ( osal_event event_obj,
unsigned int  mask 
)

Clear the event occurring in a specified task.

Description:
This API is used to set the ID of an event that has a specified mask and of which the information is stored in an event control block pointed to by eventCB to 0. eventCB must point to valid memory.
参数
event_obj[in/out] Pointer to the event control block to be cleared.
mask[in] Mask of the event to be cleared.
返回
OSAL_SUCCESS/OSAL_FAILURE
Support System:
liteos freertos.

◆ osal_event_destroy()

int osal_event_destroy ( osal_event event_obj)

Destroy a event.

Description:
This API is used to destroy a event.
参数
event_obj[in/out] Pointer to the event control block to be destroyed.
注意
this api may free memory, event_obj should be from osal_event_init.
返回
OSAL_SUCCESS/OSAL_FAILURE
Support System:
liteos freertos.

◆ osal_event_init()

int osal_event_init ( osal_event event_obj)

Initialize an event control block.

Description:
This API is used to initialize the event control block pointed to by eventCB.
返回
OSAL_SUCCESS/OSAL_FAILURE
Support System:
liteos freertos.

◆ osal_event_read()

int osal_event_read ( osal_event event_obj,
unsigned int  mask,
unsigned int  timeout_ms,
unsigned int  mode 
)

Read an event.

Description:
This API is used to block or schedule a task that reads an event of which the event control block, event mask, reading mode, and timeout information are specified.
注意
Do not read event during an interrupt. Do not recommend to use this API in software timer callback. bit 25 of the event mask is forbidden to be used on liteos.
参数
event_obj[in/out] Pointer to the event control block to be checked. This parameter must point to valid memory.
mask[in] Mask of the event expected to occur by the user, indicating the event obtained after it is logically processed that matches the ID pointed to by eventId.
timeout_ms[in] Timeout interval of event reading.(unit: ms)
mode[in] Event reading mode.
返回
OSAL_SUCCESS/OSAL_FAILURE
Support System:
liteos freertos.

◆ osal_event_write()

int osal_event_write ( osal_event event_obj,
unsigned int  mask 
)

Write an event.

Description:
This API is used to write an event specified by the passed-in event mask into an event control block pointed to by eventCB.
返回
OSAL_SUCCESS/OSAL_FAILURE
Support System:
liteos freertos.