From 6ff84cd1ca92d6145b4868b50a199998c07bf080 Mon Sep 17 00:00:00 2001
From: abagu <352211526@qq.com>
Date: Thu, 20 Dec 2018 14:01:36 +0800
Subject: [PATCH] modifiy srio drv BUG - register doorbell isr fail
---
packages/vsky/libdsp/hispeed/srio_func.c | 6 ++--
samples/full_example/.cproject | 44 ++++++++++++------------
samples/full_example/.project | 6 ++++
samples/srio/.ccsproject | 21 ++++++-----
samples/srio/.cproject | 16 +++++----
samples/srio/.project | 2 +-
samples/srio/src/board.c | 4 +--
samples/srio/src/srio.c | 2 +-
8 files changed, 54 insertions(+), 47 deletions(-)
diff --git a/packages/vsky/libdsp/hispeed/srio_func.c b/packages/vsky/libdsp/hispeed/srio_func.c
index 204c4dc..b14a34c 100644
--- a/packages/vsky/libdsp/hispeed/srio_func.c
+++ b/packages/vsky/libdsp/hispeed/srio_func.c
@@ -274,7 +274,7 @@ int srio_dev_init(uint16_t node_id, srio_intr_isr_t doorbell_isr, srio_intr_isr_
hDrvManagedSrioDrv = __srio_managed_cfg();
/* SRIO interrupts configuration*/
- _user_doorbell_isr = msg_isr;
+ _user_doorbell_isr = doorbell_isr;
_user_msg_isr = msg_isr;
srio_device_intr_enable(_srio, NULL, __lsu_tx_completion_isr, __doorbell_isr, __msg_recv_isr);
@@ -389,13 +389,13 @@ int srio_dio_read_remote(uint16_t dest_node_id, uint8_t *remote_src, uint8_t *lo
/* Populate the DIO Address Information where the data is to be sent. */
to.dio.rapidIOMSB = 0x0;
- to.dio.rapidIOLSB = (uint32_t)&local_dest[0];
+ to.dio.rapidIOLSB = (uint32_t)&remote_src[0];
to.dio.dstID = dest_node_id;
to.dio.ttype = Srio_Ttype_Request_NREAD;
to.dio.ftype = Srio_Ftype_REQUEST;
/* Send the DIO Information. */
- if (Srio_sockSend_DIO(hSrioSock, remote_src,len, (Srio_SockAddrInfo*)&to) < 0)
+ if (Srio_sockSend_DIO(hSrioSock, local_dest,len, (Srio_SockAddrInfo*)&to) < 0)
return -3;
/* Wait for the interrupt to occur without touching the peripheral. */
diff --git a/samples/full_example/.cproject b/samples/full_example/.cproject
index 6443b7d..cf7a478 100644
--- a/samples/full_example/.cproject
+++ b/samples/full_example/.cproject
@@ -88,7 +88,7 @@
-
+
@@ -124,36 +124,36 @@
-
+
-
+
-
-
+
-
-
-
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
-
@@ -161,12 +161,12 @@
-
-
-
-
-
-
+
+
+
+
+
@@ -35,7 +35,7 @@
-
+
+
@@ -87,7 +88,7 @@
-
+
@@ -123,7 +124,7 @@
-
+
@@ -135,7 +136,7 @@
-
+
+
diff --git a/samples/srio/.project b/samples/srio/.project
index a34dd26..90c63fb 100644
--- a/samples/srio/.project
+++ b/samples/srio/.project
@@ -50,7 +50,7 @@
DSPKIT
- file:/E:/dsp/6678_066/server/libdsp/packages
+ file:/E:/dspwork/libdsp/packages
diff --git a/samples/srio/src/board.c b/samples/srio/src/board.c
index 8ed45cc..03f9f7d 100644
--- a/samples/srio/src/board.c
+++ b/samples/srio/src/board.c
@@ -1,8 +1,8 @@
#include
#include
-//#define BOARD_6678x2_KD
-#define BOARD_6678x2_066
+#define BOARD_6678x2_KD
+//#define BOARD_6678x2_066
#ifdef BOARD_6678x2_KD
/**************************************************/
diff --git a/samples/srio/src/srio.c b/samples/srio/src/srio.c
index b06997e..1375758 100644
--- a/samples/srio/src/srio.c
+++ b/samples/srio/src/srio.c
@@ -100,7 +100,7 @@ int srio_task()
srio_remote_node_id = SRIO_PRODUCER_NODE_ID;
}
- srio_dev_init(srio_local_node_id, NULL, __srio_doorbell_isr, __srio_msg_isr);
+ srio_dev_init(srio_local_node_id, __srio_doorbell_isr, __srio_msg_isr);
if (g_master) {
//send a doorbell to slave