<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">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">.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">=</span><span style="color:rgb(0,0,0);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;white-space:pre"> 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>The full source can be found here:</div><div><a href="https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/pruss.c#L91">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">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">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">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>