STM32F10x library
spi.h
1 // ------------------------------------------------------------------
2 // --- spi.h - Basic routines for sending data over SPI ---
3 // --- ---
4 // --- 24.jul.2013, Matej Kogovsek (matej@hamradio.si) ---
5 // ------------------------------------------------------------------
6 
7 #ifndef MAT_SPI_H
8 #define MAT_SPI_H
9 
10 #include <inttypes.h>
11 
12 void spi_init(uint8_t devnum, const uint16_t brps);
13 void spi_putc(uint8_t devnum, uint8_t* d);
14 void spi_puts(uint8_t devnum, char* s);
15 void spi_putsn(uint8_t devnum, char* s, uint16_t n);
16 
17 // low level routines
18 void spi_cs(uint8_t devnum, uint8_t nss);
19 uint8_t spi_rw(uint8_t devnum, const uint8_t d);
20 
21 #endif
void spi_puts(uint8_t devnum, char *s)
Send and receive string.
Definition: spi.c:149
void spi_putc(uint8_t devnum, uint8_t *d)
Send and receive byte.
Definition: spi.c:137
void spi_putsn(uint8_t devnum, char *s, uint16_t n)
Send and receive string of length n.
Definition: spi.c:165
void spi_init(uint8_t devnum, uint16_t brps)
Initialize SPI interface.
Definition: spi.c:85