Naze32 clone with Frysky receiver
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

spi.h 303B

1234567891011121314151617181920212223
  1. /*
  2. * Bit-Banged SPI routines
  3. */
  4. #ifndef _SPI_H
  5. #define _SPI_H
  6. #include <stdint.h>
  7. #if defined(__AVR__)
  8. #include "avr/spi.h"
  9. #else
  10. #include "arm/spi.h"
  11. #endif
  12. void spiInit(void);
  13. uint8_t spiReadWrite(uint8_t command);
  14. #define spiWrite(x) spiReadWrite(x)
  15. #define spiRead() spiReadWrite(0)
  16. #endif