<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span>Hello,</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>I agree that g_cs variable has no important use and can be replaced. Do you want to use the pointer cs like this ? Or someway else ?</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="background-color: transparent;"><span><font><div style="font-size: small; background-color: transparent;">void
cs8900_isr(cs8900_device *cs)</div><div style="font-size: small; background-color: transparent;">{</div><div style="font-size: small; background-color: transparent;"> cs8900_interrupt(BSP_EINT3, cs);</div><div style="font-size: small; background-color: transparent;">}</div><div style="font-size: small; background-color: transparent;"><br></div><div style="background-color: transparent;"><font size="2">void cs8900_attach_interrupt (void) {</font><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-style: normal;"><font size="2">....</font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-style: normal;"><font size="2">}</font></div></font></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"></div><div style="font-family: arial, helvetica, sans-serif; font-size:
10pt;"> </div><div style="font-family: arial, helvetica, clean, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">Regards</div><div style="font-family: arial, helvetica, clean, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="background-color:transparent;line-height:1.22;">Vipul Nayyar </span></div><div style="font-family: arial, helvetica, clean, sans-serif; font-size: 12.727272033691406px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><br></div> <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1"> <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b>
Sebastian Huber <sebastian.huber@embedded-brains.de><br> <b><span style="font-weight: bold;">To:</span></b> rtems-devel@rtems.org <br><b><span style="font-weight: bold;">Cc:</span></b> Joel Sherrill <joel@rtems.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, 11 July 2013 1:29 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [rtems commit] Updated Legacy code in arm edb7312<br> </font> </div> <div class="y_msg_container"><br>On 07/10/2013 07:18 PM, Joel Sherrill wrote:<br>> diff --git a/c/src/lib/libbsp/arm/edb7312/network/network.c b/c/src/lib/libbsp/arm/edb7312/network/network.c<br>> index 1db4d02..ce139ec 100644<br>> --- a/c/src/lib/libbsp/arm/edb7312/network/network.c<br>> +++ b/c/src/lib/libbsp/arm/edb7312/network/network.c<br>> @@ -2,18 +2,13 @@<br>> #include <sys/mbuf.h><br>> #include <bsp/irq.h><br>> #include
<libchip/cs8900.h><br>> +#include <assert.h><br>><br>> #define CS8900_BASE 0x20000300<br>> unsigned int bsp_cs8900_io_base = 0;<br>> unsigned int bsp_cs8900_memory_base = 0;<br>> cs8900_device *g_cs;<br><br>This global variable is superfluous, since ...<br><br>> void cs8900_isr(rtems_irq_hdl_param unused);<br>> -rtems_irq_connect_data cs8900_isr_data = {BSP_EINT3,<br>> - cs8900_isr,<br>> - NULL,<br>> - NULL,<br>> - NULL,<br>> -
NULL};<br>><br>> char g_enetbuf[1520];<br>><br>> @@ -68,13 +63,29 @@ unsigned short cs8900_mem_get_reg (cs8900_device *cs, unsigned long reg)<br>><br>> void cs8900_attach_interrupt (cs8900_device *cs)<br>> {<br>> + rtems_status_code status = RTEMS_SUCCESSFUL;<br>> g_cs = cs;<br>> - BSP_install_rtems_irq_handler(&cs8900_isr_data);<br>> +<br>> + status = rtems_interrupt_handler_install(<br>> + BSP_EINT3,<br>> + "Network",<br>> + RTEMS_INTERRUPT_UNIQUE,<br>> + cs8900_isr,<br>> + NULL<br><br>... we can pass "cs" as an argument here and use it in cs8900_isr.<br><br>> + );<br>> + assert(status ==
RTEMS_SUCCESSFUL);<br>> }<br><br><br>-- <br>Sebastian Huber, embedded brains GmbH<br><br>Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>Phone : +49 89 189 47 41-16<br>Fax : +49 89 189 47 41-09<br>E-Mail : <a ymailto="mailto:sebastian.huber@embedded-brains.de" href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a><br>PGP : Public key available on request.<br><br>Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>_______________________________________________<br>rtems-devel mailing list<br><a ymailto="mailto:rtems-devel@rtems.org" href="mailto:rtems-devel@rtems.org">rtems-devel@rtems.org</a><br><a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-devel</a><br><br></div> </div> </div> </div></body></html>