/* Include Files */
#include "sys/sys.h"
+#include "rpp/eth.h"
+#include "sys/ti_drv_can.h"
void esmGroup1Notification(uint32_t channel)
{
while (1) ;
}
-/** Semaphore used to stop command, until message is received */
-xSemaphoreHandle linMsgReceived;
-/** Semaphore used to stop command, until ID is received */
-xSemaphoreHandle linIDReceived;
-void linNotification(linBASE_t *lin, uint32_t flags)
+#ifndef FREERTOS_POSIX
+extern boolean_t HostPendErrHandler(void);
+#if PHY_LINK_MONITOR_INT
+extern boolean_t LinkIntHandler(void);
+#endif
+#pragma INTERRUPT(MDIOMiscInt, IRQ)
+void MDIOMiscInt(void)
{
- /* FIXME Moved code from somewhere else. It was in cmd_lin.c
- * It seems that nobody in the library uses this.
- * sys/ti_drv_lin.c calls this function from linLowLevelInterrupt()
- * The function prototipe is in sys/ti_drv_lin.h, so maybe it should be
- * better to move it there, but because it is a "high-level" notification
- * it could be here.
+ if (HostPendErrHandler()) return;
+#if PHY_LINK_MONITOR_INT
+ if (LinkIntHandler()) return;
+#endif
+}
+
+extern void RxIntHandler(uint32_t instNum);
+extern void TxIntHandler(uint32_t instNum);
+
+volatile int countEMACCore0RxIsr = 0;
+#pragma INTERRUPT(EMACCore0RxIsr, IRQ)
+void EMACCore0RxIsr(void)
+{
+ countEMACCore0RxIsr++;
+ RxIntHandler(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, IRQ)
+void EMACCore0TxIsr(void)
+{
+ countEMACCore0TxIsr++;
+ TxIntHandler(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);
+ }
*/
- if (flags & LIN_ID_INT)
- xSemaphoreGiveFromISR(linIDReceived, NULL);
- if (flags & LIN_RX_INT) {
- lin->FLR |= (1 << 9);
- xSemaphoreGiveFromISR(linMsgReceived, NULL);
- }
}
+#endif /* ifndef FREERTOS_POSIX */
\ No newline at end of file