Advertisement
Guest User

Untitled

a guest
Dec 10th, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.62 KB | None | 0 0
  1. utils.h:
  2. #ifndef DRV_UTILS_H_
  3. #define DRV_UTILS_H_
  4. #include <stdint.h>
  5.  
  6. typedef void (*voidptr)(void);
  7. typedef uint16_t(*uint16ptr)(uint8_t);
  8.  
  9. #endif /* MIFARE_DRV_UTILS_H_ */
  10.  
  11.  
  12. spi.h:
  13. #ifndef MIFARE_DRV_SPI_H_
  14. #define MIFARE_DRV_SPI_H_
  15. #include "utils.h"
  16. //typedef void (*voidptr)(void);
  17.  
  18. typedef struct spiapi {
  19.     voidptr   assert;   // <- unknown type name 'voidptr'
  20.     voidptr   deassert;
  21.     voidptr   reset;    
  22.     voidptr   init;    
  23.     uint16ptr txrx;     // <- this is ok
  24. } SPI_API_T;
  25.  
  26. extern void hspi_init (void);
  27. extern uint16_t hspi_transmit(uint8_t data);
  28.  
  29. #endif /* MIFARE_DRV_SPI_H_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement