spi.h 294 B

12345678910111213141516
  1. #ifndef __SPI1_H
  2. #define __SPI1_H
  3. #include "interface.h"
  4. #define SPI1_REC_LEN 128
  5. #define SPI1_TX_LEN 128
  6. #define SPI1_DMA DMA_Channel_3
  7. #define SPI1_DMA_RXCH DMA2_Stream2
  8. #define SPI1_DMA_TXCH DMA2_Stream3
  9. void spi1_init(void);
  10. void SPI1DMA_Trans(const u8 *data, u16 count);
  11. #endif