1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
| #ifndef __SPI_H__
| #define __SPI_H__
|
| #include "mainex.h"
|
| #define SPIx_PRESCALER_SLOW SPI_BAUDRATEPRESCALER_256
| #define SPIx_PRESCALER_FAST SPI_BAUDRATEPRESCALER_4
|
| #define SPIx SPI1
|
| #define SPIx_CS GPIO_PIN_4
| #define SPIx_CS_GPIO GPIOA
|
|
|
| void Spi_Init(void);
| void Spi_ChangePrescaler(uint16_t scaling_factor);
|
| #endif
|
|