title: Can anyone explain the following C syntax?
body: <p>I came across with a library for <a href="http://www.sf.net/projects/efsl/" rel="nofollow">FAT file system</a>. It is a library for embedded systems. In the example code I found some interesting lines which I do not understand.</p>
  
  <p><strong>Here is the problematic line:</strong>:</p>
  
  <pre><code>sd_protocol.spiHwInit=(void *)atmega_spi_init;
  </code></pre>
  
  <p>where <code>sd_protocol</code> is a struct <code>SdSpiProtocol sd_protocol;</code></p>
  
  <p><strong>Here is the type definition</strong>:</p>
  
  <pre><code>struct _SdSpiProtocol
  {
      void *spiHwInterface;
      euint8 (*spiHwInit)(void* spiHwInterface);
      euint8 (*spiSendByte)(void* spiHwInterface,euint8 data);
  };
  typedef struct _SdSpiProtocol SdSpiProtocol;
  </code></pre>
  
  <p><strong>and <code>atmega_spi_init</code> is the following function</strong>:</p>
  
  <pre><code>euint8 atmega_spi_init(atmegaSpiInterface *iface)
  {
      euint8 i;
  
      /* Unselect card */
      PORTB |= iface-&gt;pinSelect;
  
      /* Set as master, clock and chip select output */
      DDR_SPI = (1&lt;&lt;DD_MOSI) | (1&lt;&lt;DD_SCK) | 1;
  
      /* Enable SPI, master, set clock rate to fck/2 */
      SPCR = (1&lt;&lt;SPE) | (1&lt;&lt;MSTR); /* fsck / 4 */
      SPSR = 1; /* fsck / 2 */
  
      /* Send 10 spi commands with card not selected */
      for(i=0;i&lt;10;i++)
          atmega_spi_send(iface,0xff);
  
      /* Select card */
      PORTB &amp;= ~(iface-&gt;pinSelect);
  
      return(0);
  }
  </code></pre>
  
  <p><code>sd_protocol.spiHwInit=(void *)atmega_spi_init;</code> this is not a function call, then what it is?</p>
  
  <p>and I do not understand what this line supposed to do either, in the type definition:</p>
  
  <p><code>euint8 (*spiHwInit)(void* spiHwInterface);</code></p>
  
  <p>Thanks in advance!</p>