分别采用中断、查询方式优化转发时间,上传备份代码,通过控制Makefile脚本里的APP_MARCH、MABI的rv32i和rv32e来控制C语言和asm优化
This commit is contained in:
@@ -5,10 +5,6 @@
|
||||
#include "halfLvdsMacSvr.h"
|
||||
#include "plic.h"
|
||||
|
||||
#ifdef __riscv_i
|
||||
#define USING_POLL_STRATEGY
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
//internal function
|
||||
static uint32_t init_plic(void);
|
||||
@@ -26,13 +22,9 @@ void main()
|
||||
for (i = 0; i < 100; i++)
|
||||
asm volatile("nop");
|
||||
|
||||
#ifdef USING_POLL_STRATEGY
|
||||
//使用查询策略 POLL_STRATEGY 操作 half lvds mac
|
||||
HLM_poll(WORKMODE_MASTER);
|
||||
#else
|
||||
//使用中断策略操作half lvds mac
|
||||
HLM_work_with_isr(WORKMODE_MASTER);
|
||||
#endif
|
||||
|
||||
|
||||
while (1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user