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

函数

void * osal_irq_get_private_dev (void *param_dev)
 get irq_handler dev.
 
int osal_irq_request (unsigned int irq, osal_irq_handler handler, osal_irq_handler thread_fn, const char *name, void *dev)
 alloc an interrupt line.
 
void osal_irq_free (unsigned int irq, void *dev)
 free an interrupt allocd with request_irq.
 
int osal_irq_set_priority (unsigned int irq, unsigned short priority)
 Set interrupts priority.
 
int osal_irq_set_affinity (unsigned int irq, const char *name, int cpu_mask)
 Setting the CPU Affinity of Interrupts.
 
void osal_irq_enable (unsigned int irq)
 enable handling of an irq.
 
void osal_irq_disable (unsigned int irq)
 disable an irq and wait for completion.
 
unsigned int osal_irq_lock (void)
 Disable all interrupts.
 
unsigned int osal_irq_unlock (void)
 Enable all interrupts.
 
void osal_irq_restore (unsigned int irq_status)
 Restore interrupts.
 
unsigned int osal_irq_clear (unsigned int vector)
 Clear the pending status of other interrupts.
 
int osal_in_interrupt (void)
 Check whether the current interrupt is in interrupt.
 
int osal_tasklet_init (osal_tasklet *tasklet)
 initialize tasklet.
 
int osal_tasklet_schedule (osal_tasklet *tasklet)
 schedule tasklet.
 
int osal_tasklet_kill (osal_tasklet *tasklet)
 Close tasklet.
 
int osal_tasklet_update (osal_tasklet *tasklet)
 Update tasklet.
 

详细描述

函数说明

◆ osal_in_interrupt()

int osal_in_interrupt ( void  )

Check whether the current interrupt is in interrupt.

Description:
Check whether the current interrupt is in the context of hard interrupts, soft interrupts, and unmaskable interrupts.
返回
false/true
Support System:
linux liteos nonos freertos.

◆ osal_irq_clear()

unsigned int osal_irq_clear ( unsigned int  vector)

Clear the pending status of other interrupts.

Description:
This API is used to clear the pending status of other interrupts.
参数
vector[in] interrupt vector.
Support System:
liteos freertos.

◆ osal_irq_disable()

void osal_irq_disable ( unsigned int  irq)

disable an irq and wait for completion.

Description:
Disable the selected interrupt line.
参数
irq[in] Interrupt to disable.
Support System:
linux liteos seliteos freertos.
Description:
Disable the corresponding interrupt mask of the interrupt controller, so that the interrupt source can be sent to the CPU.
注意
This function depends on the hardware implementation of the interrupt controller.

◆ osal_irq_enable()

void osal_irq_enable ( unsigned int  irq)

enable handling of an irq.

Description:
Undoes the effect of one call to disable_irq(). If this matches the last disable, processing of interrupts on this IRQ line is re-enabled.
参数
irq[in] Interrupt to enable.
Support System:
linux liteos seliteos freertos.

◆ osal_irq_free()

void osal_irq_free ( unsigned int  irq,
void *  dev 
)

free an interrupt allocd with request_irq.

参数
irq[in] Interrupt line to free.
dev[in] Device identity to free.
注意
This function must not be called from interrupt context. In linux userspace, the parameter dev must be the same as the dev parameter of the osal_irq_request function.
Support System:
linux liteos seliteos freertos.

◆ osal_irq_get_private_dev()

void * osal_irq_get_private_dev ( void *  param_dev)

get irq_handler dev.

参数
param_dev[in] Parameters passed to the callback function.
返回
Returns the parameters that can be used directly.
Support System:
linux liteos freertos seliteos.

◆ osal_irq_lock()

unsigned int osal_irq_lock ( void  )

Disable all interrupts.

Description:
This API is used to disable all IRQ and FIQ interrupts in the CPSR.
返回
CPSR value before all interrupts are disabled.
Support System:
liteos seliteos nonos freertos.

◆ osal_irq_request()

int osal_irq_request ( unsigned int  irq,
osal_irq_handler  handler,
osal_irq_handler  thread_fn,
const char *  name,
void *  dev 
)

alloc an interrupt line.

参数
irq[in] Interrupt line to alloc.
handler[in] Function to be called when the IRQ occurs. Primary handler for threaded interrupts. If NULL and thread_fn != NULL the default primary handler is installed.
thread_fn[in] Function called from the irq handler thread. If NULL, no irq thread is created.
name[in] An ascii name for the claiming device.
dev[in] A cookie passed back to the handler function.
注意
In linux userspace, the type of the dev parameter must be (drval_irq_arg *).
返回
OSAL_SUCCESS/OSAL_FAILURE
Support System:
linux liteos seliteos freertos.

◆ osal_irq_restore()

void osal_irq_restore ( unsigned int  irq_status)

Restore interrupts.

Description:
This API is used to restore the CPSR value obtained before all interrupts are disabled by osal_irq_lock.
注意
This API can be called only after all interrupts are disabled, and the input parameter value should be the value returned by osal_irq_lock.
Support System:
liteos seliteos nonos freertos.

◆ osal_irq_set_affinity()

int osal_irq_set_affinity ( unsigned int  irq,
const char *  name,
int  cpu_mask 
)

Setting the CPU Affinity of Interrupts.

Description:
Setting the CPU Affinity of Interrupts.
参数
irq[in] irq number.
name[in] irq name.
cpu_mask[in] cpu_musk. one of the following: OSAL_CPU_ALL, OSAL_CPU_0, OSAL_CPU_1, OSAL_CPU_2, OSAL_CPU_3
Support System:
linux liteos seliteos.

◆ osal_irq_set_priority()

int osal_irq_set_priority ( unsigned int  irq,
unsigned short  priority 
)

Set interrupts priority.

Description:
Set interrupts priority.
注意
This function depends on the hardware implementation of the interrupt controller and CPU architecture.
返回
OSAL_SUCCESS/OSAL_FAILURE
Support System:
liteos freertos.

◆ osal_irq_unlock()

unsigned int osal_irq_unlock ( void  )

Enable all interrupts.

Description:
This API is used to enable all IRQ and FIQ interrupts in the CPSR.
返回
CPSR value after all interrupts are enabled.
Support System:
liteos seliteos nonos freertos.

◆ osal_tasklet_init()

int osal_tasklet_init ( osal_tasklet tasklet)

initialize tasklet.

Description:
initialize tasklet.
注意
Before invoking this interface, assign values to the handler and data members of osal_tasklet and leave the tasklet member tasklet empty.
参数
tasklet[in/out] The tasklet to be initialized.
Support System:
linux liteos seliteos.

◆ osal_tasklet_kill()

int osal_tasklet_kill ( osal_tasklet tasklet)

Close tasklet.

Description:
Close tasklet.
Support System:
linux liteos seliteos.

◆ osal_tasklet_schedule()

int osal_tasklet_schedule ( osal_tasklet tasklet)

schedule tasklet.

Support System:
linux liteos seliteos.

◆ osal_tasklet_update()

int osal_tasklet_update ( osal_tasklet tasklet)

Update tasklet.

Description:
Update tasklet.
Support System:
linux liteos seliteos.