<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 16, 2019, 6:34 AM Nils Hölscher <<a href="mailto:nilhoel1@gmail.com">nilhoel1@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I am currently porting the pruss driver functions, that I want to add in:</div><div><span style="color:rgb(0,0,0);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;white-space:pre-wrap">rtems_filesystem_file_handlers_r pruss_irq_handler.</span></div><div>But when I add  my functions like this:</div><div>  <span style="color:rgb(0,0,0);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;white-space:pre-wrap">.open_h </span><span style="color:rgb(0,0,0);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;white-space:pre-wrap">=</span><span style="color:rgb(0,0,0);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;white-space:pre-wrap"> ti_pruss_irq_open</span>  </div><div>I receive the following compiler warnings:</div><div>../../pruss.c:156:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]<br>   .open_h = ti_pruss_irq_open,<br>             ^~~~~~~~~~~~~~~~~<br>../../pruss.c:156:13: note: (near initialization for 'pruss_irq_handler.open_h')<br>../../pruss.c:158:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]<br>   .read_h = ti_pruss_irq_read,<br></div><div><br></div><div>Can anyone help please?</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">This usually means that either the prototype of the method has not been seen before it is used or the method signature does not match that expected of the indirect method pointer on the left hand side. Make sure the signature matches.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>The full source can be found here:</div><div><a href="https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/pruss.c#L91" target="_blank" rel="noreferrer">https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/pruss.c#L91</a></div><div><a href="https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/pruss.c#L155" target="_blank" rel="noreferrer">https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/pruss.c#L155</a><br></div><div><br></div><div>Best,</div><div>Nils</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 15 Jul 2019 at 10:15, Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank" rel="noreferrer">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 15/07/2019 10:10, Nils Hölscher wrote:<br>
> Thanks this is very helpful.<br>
> But has anyone an existing example of a similar driver?<br>
> I wasn't able find one in /bsps, maybe I didn't search long enough.<br>
<br>
There are some in cpukit:<br>
<br>
cpukit/libcsupport/src/consolesimple.c:  IMFS_make_generic_node(<br>
cpukit/libcsupport/src/termios.c:  rv = IMFS_make_generic_node(<br>
cpukit/libcsupport/src/consolesimpletask.c:  IMFS_make_generic_node(<br>
cpukit/include/rtems/imfs.h: *   rv = IMFS_make_generic_node(<br>
cpukit/include/rtems/imfs.h:extern int IMFS_make_generic_node(<br>
cpukit/libfs/src/imfs/imfs_make_generic_node.c:int IMFS_make_generic_node(<br>
cpukit/dev/i2c/i2c-bus.c:  rv = IMFS_make_generic_node(<br>
cpukit/dev/i2c/i2c-dev.c:  rv = IMFS_make_generic_node(<br>
cpukit/dev/spi/spi-bus.c:  rv = IMFS_make_generic_node(<br>
cpukit/libblock/src/blkdev-imfs.c:      int rv = IMFS_make_generic_node(<br>
cpukit/libblock/src/blkdev-imfs.c:            rv = IMFS_make_generic_node(<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 href="mailto:sebastian.huber@embedded-brains.de" target="_blank" rel="noreferrer">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>
</blockquote></div>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div></div>