<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>You want this : (rtems_interrupt_handler)cs8900_isr ?</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;">Plus, Do I need to put 0 instead of NULL ? I don't know right now if I'm aware of the answer or I'm just overlooking it .</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;">Regards</div><div
style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;"><span style="background-color:transparent;line-height:1.22;">Vipul Nayyar </span></div><div style="color: rgb(0, 0, 0); font-size: 12.727272033691406px; font-family: arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;"><br></div><div><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;">Sent:</span></b> Friday, 12 July 2013 5:07 PM<br> <b><span style="font-weight:
bold;">Subject:</span></b> Re: [PATCH] Updated Legacy code in arm rtl22xx<br> </font> </div> <div class="y_msg_container"><br>On 07/12/2013 01:24 PM, Vipul Nayyar wrote:<br>> ---<br>> c/src/lib/libbsp/arm/rtl22xx/network/network.c | 37 +++++++++++++++-----------<br>> c/src/libchip/network/cs8900.c | 4 +--<br>> c/src/libchip/network/cs8900.h | 4 +--<br>> 3 files changed, 26 insertions(+), 19 deletions(-)<br>><br>> diff --git a/c/src/lib/libbsp/arm/rtl22xx/network/network.c b/c/src/lib/libbsp/arm/rtl22xx/network/network.c<br>> index 3b54862..77dc3e2 100644<br>> --- a/c/src/lib/libbsp/arm/rtl22xx/network/network.c<br>> +++ b/c/src/lib/libbsp/arm/rtl22xx/network/network.c<br>> @@ -3,24 +3,18 @@<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>> -void cs8900_isr(rtems_irq_hdl_param unused);<br>> -rtems_irq_connect_data cs8900_isr_data = {LPC22xx_INTERRUPT_EINT2,<br>> - cs8900_isr,<br>> - NULL,<br>> - NULL,<br>> - NULL,<br>> -
NULL};<br>> +void cs8900_isr(cs8900_device *cs);<br>><br>> char g_enetbuf[1520];<br>><br>> -void cs8900_isr(rtems_irq_hdl_param unused)<br>> +void cs8900_isr(cs8900_device *cs)<br>> {<br>> - cs8900_interrupt(LPC22xx_INTERRUPT_EINT2, g_cs);<br>> + cs8900_interrupt(LPC22xx_INTERRUPT_EINT2, cs);<br>> }<br>><br>> /* cs8900_io_set_reg - set one of the I/O addressed registers */<br>> @@ -67,15 +61,28 @@ unsigned short cs8900_mem_get_reg (cs8900_device *cs, unsigned long reg)<br>> return cs8900_io_get_reg(cs, CS8900_IO_PP_DATA_PORT0);<br>> }<br>><br>> -void cs8900_attach_interrupt (cs8900_device *cs)<br>> +void cs8900_attach_interrupt (void)<br>> {<br>> - g_cs = cs;<br>> -
BSP_install_rtems_irq_handler(&cs8900_isr_data);<br>> + rtems_status_code status = RTEMS_SUCCESSFUL;<br>> + status = rtems_interrupt_handler_install(<br>> + LPC22xx_INTERRUPT_EINT2,<br>> + "Network",<br>> + RTEMS_INTERRUPT_UNIQUE,<br>> + (void *)cs8900_isr,<br><br>Please use the right function type and move the cast inside the cs8900_isr.<br><br>> + NULL<br>> + );<br>[...]<br><br>This will not work. Do you know why?<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>