1 /** @file notification.c
2 * @brief User Notification Definition File
6 * This file defines empty notification routines.
7 * The user needs to remove the while loop and define
17 void esmGroup1Notification(uint32_t channel)
19 /* enter user code and remove the while loop... */
23 void esmGroup2Notification(uint32_t channel)
25 /* enter user code and remove the while loop... */
29 void memoryPort0TestFailNotification(uint32_t groupSelect, uint32_t dataSelect, uint32_t address, uint32_t data)
31 /* enter user code and remove the while loop... */
35 void memoryPort1TestFailNotification(uint32_t groupSelect, uint32_t dataSelect, uint32_t address, uint32_t data)
37 /* enter user code and remove the while loop... */
40 /** @brief Semaphore blocking task when it waits for interrupt signaling message receive
43 void canErrorNotification(canBASE_t *node, uint32_t notification)
46 void canMessageNotification(canBASE_t *node, uint32_t messageBox)
49 void gioNotification(int bit)
51 /* enter user code and remove the while loop... */
55 void i2cNotification(i2cBASE_t *i2c, uint32_t flags)
57 /* enter user code and remove the while loop... */
61 void mibspiNotification(mibspiBASE_t *mibspi, uint32_t flags)
63 /* enter user code and remove the while loop... */
67 void mibspiGroupNotification(mibspiBASE_t *mibspi, uint32_t group)
69 /* enter user code and remove the while loop... */
73 void pwmNotification(hetBASE_t *hetREG,uint32_t pwm, uint32_t notification)
75 /* enter user code and remove the while loop... */
79 void edgeNotification(hetBASE_t *hetREG,uint32_t edge)
81 /* enter user code and remove the while loop... */
85 void hetNotification(hetBASE_t *het, uint32_t offset)
87 /* enter user code and remove the while loop... */
91 /** Semaphore used to stop command, until message is received */
92 xSemaphoreHandle linMsgReceived;
93 /** Semaphore used to stop command, until ID is received */
94 xSemaphoreHandle linIDReceived;
95 void linNotification(linBASE_t *lin, uint32_t flags)
97 /* FIXME Moved code from somewhere else. It was in cmd_lin.c
98 * It seems that nobody in the library uses this.
99 * sys/ti_drv_lin.c calls this function from linLowLevelInterrupt()
100 * The function prototipe is in sys/ti_drv_lin.h, so maybe it should be
101 * better to move it there, but because it is a "high-level" notification
104 if (flags & LIN_ID_INT)
105 xSemaphoreGiveFromISR(linIDReceived, NULL);
106 if (flags & LIN_RX_INT) {
107 lin->FLR |= (1 << 9);
108 xSemaphoreGiveFromISR(linMsgReceived, NULL);
112 #ifndef FREERTOS_POSIX
113 extern boolean_t HostPendErrHandler(void);
114 #if PHY_LINK_MONITOR_INT
115 extern boolean_t LinkIntHandler(void);
117 #pragma INTERRUPT(MDIOMiscInt, IRQ)
118 void MDIOMiscInt(void)
120 if (HostPendErrHandler()) return;
121 #if PHY_LINK_MONITOR_INT
122 if (LinkIntHandler()) return;
126 extern void RxIntHandler(uint32_t instNum);
127 extern void TxIntHandler(uint32_t instNum);
129 volatile int countEMACCore0RxIsr = 0;
130 #pragma INTERRUPT(EMACCore0RxIsr, IRQ)
131 void EMACCore0RxIsr(void)
133 countEMACCore0RxIsr++;
135 /* FIXME was in emac_cmd.c/eth.c and should move somewhere else.
138 // We know we have only one RX Packet Buffer descriptor --
139 // so we write it in CP to disable interrupt
140 EMACRxCPWrite(emacBase, channel, (unsigned int)rx_desc);
141 EMACCoreIntAck(emacBase, EMAC_INT_CORE0_RX);
145 volatile int countEMACCore0TxIsr = 0;
146 #pragma INTERRUPT(EMACCore0TxIsr, IRQ)
147 void EMACCore0TxIsr(void)
149 countEMACCore0TxIsr++;
151 /* FIXME Was in emac_cmd.c/eth.c and should move somewhere else
153 // If is not being processed by the EMAC anymore
154 if (!(fr1.PktFlgLen & EMAC_DSC_FLAG_OWNER)) {
155 EMACTxCPWrite(emacBase, channel, (unsigned int)&fr1);
156 EMACCoreIntAck(emacBase, EMAC_INT_CORE0_TX);
160 #endif /* ifndef FREERTOS_POSIX */