]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blob - rpp/src/sys/notification.c
bd16549edc63e0848de57ad364e8f47bfe156fba
[pes-rpp/rpp-lib.git] / rpp / src / sys / notification.c
1 /** @file notification.c
2  *   @brief User Notification Definition File
3  *   @date 15.Mar.2012
4  *   @version 03.01.00
5  *
6  *   This file  defines  empty  notification  routines.
7  *   The user needs to remove the while loop and define
8  *   the sequence.
9  *
10  */
11
12 /* Include Files */
13
14 #include "sys/sys.h"
15 #include "rpp/eth.h"
16 #include "sys/ti_drv_can.h"
17
18 void esmGroup1Notification(uint32_t channel)
19 {
20 /*  enter user code and remove the while loop... */
21         while (1) ;
22 }
23
24 void esmGroup2Notification(uint32_t channel)
25 {
26 /*  enter user code and remove the while loop... */
27         while (1) ;
28 }
29
30 void memoryPort0TestFailNotification(uint32_t groupSelect, uint32_t dataSelect, uint32_t address, uint32_t data)
31 {
32 /*  enter user code and remove the while loop... */
33         while (1) ;
34 }
35
36 void memoryPort1TestFailNotification(uint32_t groupSelect, uint32_t dataSelect, uint32_t address, uint32_t data)
37 {
38 /*  enter user code and remove the while loop... */
39         while (1) ;
40 }
41 /** @brief Semaphore blocking task when it waits for interrupt signaling message receive
42  *
43  */
44 void canErrorNotification(canBASE_t *node, uint32_t notification)
45 {}
46
47 void canMessageNotification(canBASE_t *node, uint32_t messageBox)
48 {}
49
50 void gioNotification(int bit)
51 {
52 /*  enter user code and remove the while loop... */
53         while (1) ;
54 }
55
56 void i2cNotification(i2cBASE_t *i2c, uint32_t flags)
57 {
58 /*  enter user code and remove the while loop... */
59         while (1) ;
60 }
61
62 void mibspiNotification(mibspiBASE_t *mibspi, uint32_t flags)
63 {
64 /*  enter user code and remove the while loop... */
65         while (1) ;
66 }
67
68 void mibspiGroupNotification(mibspiBASE_t *mibspi, uint32_t group)
69 {
70 /*  enter user code and remove the while loop... */
71         while (1) ;
72 }
73
74 void pwmNotification(hetBASE_t *hetREG,uint32_t pwm, uint32_t notification)
75 {
76 /*  enter user code and remove the while loop... */
77         while (1) ;
78 }
79
80 void edgeNotification(hetBASE_t *hetREG,uint32_t edge)
81 {
82 /*  enter user code and remove the while loop... */
83         while (1) ;
84 }
85
86 void hetNotification(hetBASE_t *het, uint32_t offset)
87 {
88 /*  enter user code and remove the while loop... */
89         while (1) ;
90 }
91
92 #ifndef FREERTOS_POSIX
93 extern boolean_t HostPendErrHandler(void);
94 #if PHY_LINK_MONITOR_INT
95 extern boolean_t LinkIntHandler(void);
96 #endif
97 #pragma INTERRUPT(MDIOMiscInt, IRQ)
98 void MDIOMiscInt(void)
99 {
100         if (HostPendErrHandler()) return;
101 #if PHY_LINK_MONITOR_INT
102         if (LinkIntHandler()) return;
103 #endif
104 }
105
106 extern void RxIntHandler(uint32_t instNum);
107 extern void TxIntHandler(uint32_t instNum);
108
109 volatile int countEMACCore0RxIsr = 0;
110 #pragma INTERRUPT(EMACCore0RxIsr, IRQ)
111 void EMACCore0RxIsr(void)
112 {
113         countEMACCore0RxIsr++;
114         RxIntHandler(0);
115         /* FIXME was in emac_cmd.c/eth.c and should move somewhere else.
116            rx_irq_cnt++;
117
118            // We know we have only one RX Packet Buffer descriptor --
119            // so we write it in CP to disable interrupt
120            EMACRxCPWrite(emacBase, channel, (unsigned int)rx_desc);
121            EMACCoreIntAck(emacBase, EMAC_INT_CORE0_RX);
122          */
123 }
124
125 volatile int countEMACCore0TxIsr = 0;
126 #pragma INTERRUPT(EMACCore0TxIsr, IRQ)
127 void EMACCore0TxIsr(void)
128 {
129         countEMACCore0TxIsr++;
130         TxIntHandler(0);
131         /* FIXME Was in emac_cmd.c/eth.c and should move somewhere else
132            tx_irq_cnt++;
133            // If is not being processed by the EMAC anymore
134            if (!(fr1.PktFlgLen & EMAC_DSC_FLAG_OWNER)) {
135            EMACTxCPWrite(emacBase, channel, (unsigned int)&fr1);
136            EMACCoreIntAck(emacBase, EMAC_INT_CORE0_TX);
137            }
138          */
139 }
140 #endif /* ifndef FREERTOS_POSIX */