]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - rpp/src/sys/notification.c
Back to modified HALCoGen version + DHCP srv addr assigning fixed
[pes-rpp/rpp-lib.git] / rpp / src / sys / notification.c
index d4cecaee2e40fccc9af463220db2ae179e2c278a..28494741296d2380cc9a53bf69a7a5e5f0cbd3da 100644 (file)
@@ -260,8 +260,41 @@ void linNotification(linBASE_t *lin, uint32_t flags)
     }
 }
 
-#if 0
-#endif
+extern void EMACCore0RxIsrHandler(unsigned int instNum);
+extern void EMACCore0TxIsrHandler(unsigned int instNum);
+
+volatile int countEMACCore0RxIsr = 0;
+#pragma INTERRUPT(EMACCore0RxIsr, FIQ)
+void EMACCore0RxIsr(void)
+{
+       countEMACCore0RxIsr++;
+       EMACCore0RxIsrHandler(0);
+    /* FIXME was in emac_cmd.c/eth.c and should move somewhere else.
+    rx_irq_cnt++;
+
+    // We know we have only one RX Packet Buffer descriptor --
+    // so we write it in CP to disable interrupt
+    EMACRxCPWrite(emacBase, channel, (unsigned int)rx_desc);
+    EMACCoreIntAck(emacBase, EMAC_INT_CORE0_RX);
+    */
+}
+
+volatile int countEMACCore0TxIsr = 0;
+#pragma INTERRUPT(EMACCore0TxIsr, FIQ)
+void EMACCore0TxIsr(void)
+{
+       countEMACCore0TxIsr++;
+       EMACCore0TxIsrHandler(0);
+    /* FIXME Was in emac_cmd.c/eth.c and should move somewhere else
+    tx_irq_cnt++;
+    // If is not being processed by the EMAC anymore
+    if (!(fr1.PktFlgLen & EMAC_DSC_FLAG_OWNER)) {
+       EMACTxCPWrite(emacBase, channel, (unsigned int)&fr1);
+       EMACCoreIntAck(emacBase, EMAC_INT_CORE0_TX);
+    }
+    */
+}
+
 
 /* USER CODE BEGIN (38) */
 /* USER CODE END */