modify XiUOS DIR : (1.add plc_demo in APP_Framework/control_app; 2.add industrial_network、industrial_fieldbus and industrial_wlan; 3.add XiZi_AIoT and modify XiZi as XiZi_IIoT.)
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* @file interrupt.c
|
||||
* @brief support gap8 interrupt enable and disable
|
||||
* @version 1.0
|
||||
* @author AIIT XUOS Lab
|
||||
* @date 2021-09-02
|
||||
*/
|
||||
|
||||
|
||||
#include <arch_interrupt.h>
|
||||
#include <xs_base.h>
|
||||
#include <xs_isr.h>
|
||||
#include <core_feature_base.h>
|
||||
|
||||
int ArchDisableHwIrq(uint32_t irq_num)
|
||||
{
|
||||
ECLIC_DisableIRQ(irq_num);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ArchEnableHwIrq(uint32_t irq_num)
|
||||
{
|
||||
ECLIC_EnableIRQ(irq_num);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
x_base DisableLocalInterrupt(void)
|
||||
{
|
||||
return __RV_CSR_READ_CLEAR(CSR_MSTATUS, MSTATUS_MIE);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: EnableLocalInterrupt
|
||||
*
|
||||
* Description:
|
||||
* Return the current interrupt state and enable interrupts
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void EnableLocalInterrupt(x_base oldstat)
|
||||
{
|
||||
__RV_CSR_WRITE(CSR_MSTATUS, oldstat);
|
||||
}
|
||||
|
||||
|
||||
// extern void KTaskOsAssignAfterIrq(void *context);
|
||||
|
||||
// void IsrEntry()
|
||||
// {
|
||||
// uint32 ipsr;
|
||||
|
||||
// isrManager.done->incCounter();
|
||||
// isrManager.done->handleIrq(ipsr);
|
||||
// KTaskOsAssignAfterIrq(NONE);
|
||||
// isrManager.done->decCounter();
|
||||
|
||||
// }
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user