增加代码,将主站的中断优化,只使用了4个寄存器用于中断的处理,缩减了处理的时间。通过对比优化前代码波形和优化后代码波形,代码应该是正确的
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#ifndef _TL2CDR_H_
|
||||
#define _TL2CDR_H_
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#define TL2CDR_BASE 0x10000000U
|
||||
|
||||
@@ -32,7 +34,7 @@
|
||||
#define CDR_INT_RXSTART 16
|
||||
#define CDR_INT_RXEND 17
|
||||
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
extern volatile uint32_t *cdr_status = (uint32_t*)( TL2CDR_BASE + CDR_ReadStatus ); //read
|
||||
extern volatile uint32_t *cdr_txLen = (uint32_t*)( TL2CDR_BASE + CDR_WriteTxLen ); //write
|
||||
extern volatile uint32_t *cdr_txFifo = (uint32_t*)( TL2CDR_BASE + CDR_WriteTxFifo ); //write
|
||||
@@ -45,5 +47,6 @@ extern volatile uint32_t *cdr_IsLast = (uint32_t*)( TL2CDR_BASE + CDR_ReadIsL
|
||||
// extern uint32_t gpio_write( uint32_t data );
|
||||
|
||||
// void gpio_test();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user