spi.h 396 B

12345678910111213141516171819202122
  1. /*
  2. * spi.h
  3. *
  4. * Created on: Nov 16, 2015
  5. * Author: Philipp Hinz
  6. */
  7. #ifndef SPI_H_
  8. #define SPI_H_
  9. #include <inttypes.h>
  10. uint8_t spi_readwrite(uint8_t data);
  11. void spi_init(void);
  12. void shift_init(void);
  13. void shift_data(uint8_t data);
  14. #define SHIFT_SCLR 21 // ~Master Reset
  15. #define SHIFT_RCK 22 // storage register clock input
  16. #define SHIFT_G 26 // ~Output Enable
  17. #endif /* SPI_H_ */