diff options
Diffstat (limited to 'lib/spi_sw.h')
| -rw-r--r-- | lib/spi_sw.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/spi_sw.h b/lib/spi_sw.h new file mode 100644 index 0000000..26af12d --- /dev/null +++ b/lib/spi_sw.h @@ -0,0 +1,22 @@ +#define STM32F1 +#include <stdint.h> +#include <stdbool.h> +#include <sys/types.h> +#include <libopencm3/stm32/gpio.h> +#include "ili9341.h" + +#ifndef SPI_SW +#define SPI_SW + +#define TRAILING_EDGE false + +typedef struct { + uint16_t MOSI_pin; + uint16_t CLK_pin; + uint16_t delay; +} SPI_IMPL; + +SPI_IMPL SpiInit(uint16_t MOSI_pin, uint16_t CLK_pin); +void SpiSend(SPI_IMPL *spi, uint8_t playload); + +#endif //SPI_SW |
