#ifndef APP_SPI_2_H
#define APP_SPI_2_H
  #include <stdint.h>
  #include <stddef.h>

  typedef struct
  { 
      void (*Init)();
      void (*DeInit)();
      void (*SetNSS)();
      void (*ClrNSS)();
      void (*Transmit)( uint8_t * pTxBuf, size_t size );
      void (*Receive)( uint8_t * pRxBuf, size_t size );
      void (*TransmitReceive)( uint8_t * pTxBuf, uint8_t * pRxBuf, size_t size );
  }
  SPI_Handle_t;

  // SPI2_KEEP_NSS_PULLEDUP
  // if enabled (=1) keeps NSS pin pulled up when deinitialized
  #define SPI2_KEEP_NSS_PULLEDUP   1

  extern const SPI_Handle_t SPIHandle;
#endif